com.anabas.ibus
Class GMS_PublisherImpl

java.lang.Object
  |
  +--com.anabas.ibus.GMS_PublisherImpl

public class GMS_PublisherImpl
extends java.lang.Object
implements GMS_StreamPublisher

Title: Description: Copyright: Copyright (c) 2000 Company:


Constructor Summary
GMS_PublisherImpl(com.anabas.ibus.TopicPublisher publisher, com.anabas.ibus.TopicSession s, GMS_StreamImpl parent)
           
 
Method Summary
 void broadcast(GMS_Message m)
          Deliver a broadcast.
 void broadcast(GMS_Message m, boolean noLocal)
          Broadcasts a message with explicit noLocal.
static javax.jms.Message convertMessage(GMS_Message m)
           
 GMS_DestinationSelector createDestinationSelector(java.lang.String name)
          Creates an instance of the specified desintation selector type.
 GMS_Message createMessage(short msgType, short bodyType)
          Get a list of Destinations that are subscribed to this channel.
 GMS_Message request(GMS_Message m, GMS_Destination d, long timeout)
          Requests a message and block on the first reply.
 void sendMessage(GMS_Message m, GMS_Destination d)
          Sends a message to a destination.
 void sendMessage(GMS_Message m, GMS_Destination d, boolean noLocal)
          Sends a message to a destination.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GMS_PublisherImpl

public GMS_PublisherImpl(com.anabas.ibus.TopicPublisher publisher,
                         com.anabas.ibus.TopicSession s,
                         GMS_StreamImpl parent)
Method Detail

createDestinationSelector

public GMS_DestinationSelector createDestinationSelector(java.lang.String name)
Creates an instance of the specified desintation selector type. The name must be the name of cone of the destination selector instances without the package name. For example MulticastDestinationSelector.
Specified by:
createDestinationSelector in interface GMS_StreamPublisher
Parameters:
name - The Class name (w/o package name. Assumes com.anabas.gxo) of the destination selector to create.
Returns:
An instance of the specified destination selector. null if the type is not supported.

createMessage

public GMS_Message createMessage(short msgType,
                                 short bodyType)
                          throws GXO_Exception
Description copied from interface: GMS_StreamPublisher
Get a list of Destinations that are subscribed to this channel.
Specified by:
createMessage in interface GMS_StreamPublisher
Tags copied from interface: GMS_StreamPublisher
Parameters:
type - The type of the message as listed in the Message public static final variables.

convertMessage

public static javax.jms.Message convertMessage(GMS_Message m)
                                        throws GXO_Exception

request

public GMS_Message request(GMS_Message m,
                           GMS_Destination d,
                           long timeout)
                    throws GXO_Exception
Requests a message and block on the first reply. Requests currently has noLocal set to true so that local client can not reply to its own request.
Specified by:
request in interface GMS_StreamPublisher
Returns:
null if timeout occurs.

sendMessage

public void sendMessage(GMS_Message m,
                        GMS_Destination d,
                        boolean noLocal)
                 throws GXO_Exception
Sends a message to a destination.

sendMessage

public void sendMessage(GMS_Message m,
                        GMS_Destination d)
                 throws GXO_Exception
Sends a message to a destination. The local subscribers will also receive the message if the exthe destination includes the local subscriber.
Specified by:
sendMessage in interface GMS_StreamPublisher

broadcast

public void broadcast(GMS_Message m)
               throws GXO_Exception
Deliver a broadcast. The local client will also receive the broadcasted message.
Specified by:
broadcast in interface GMS_StreamPublisher

broadcast

public void broadcast(GMS_Message m,
                      boolean noLocal)
               throws GXO_Exception
Broadcasts a message with explicit noLocal. If noLocal is true then the message is not delivered to the local subscribers.