com.anabas.ibus
Class GMS_SubscriberImpl

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

public class GMS_SubscriberImpl
extends java.lang.Object
implements GMS_StreamSubscriber

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


Field Summary
protected  GMS_MessageSelector m_selector
           
protected  com.anabas.ibus.TopicSession m_session
           
protected  com.anabas.ibus.TopicSubscriber m_subscriber
           
 
Constructor Summary
GMS_SubscriberImpl(com.anabas.ibus.TopicSubscriber sub, com.anabas.ibus.TopicSession session, GMS_MessageSelector selector)
           
 
Method Summary
static GMS_Message convertMessage(javax.jms.Message m)
           
 GMS_MessageSelector createMessageSelector(java.lang.String name)
          Creates an instance of the specified message selector type.
 GMS_Message receiveMessage()
          Synchronous reception of messages.
 void setMessageListener(GMS_MessageListener m)
          Set a listener for asychronous reception of messages.
 void setSelector(GMS_MessageSelector s)
          Sets the message filter for the subscriber.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_subscriber

protected com.anabas.ibus.TopicSubscriber m_subscriber

m_session

protected com.anabas.ibus.TopicSession m_session

m_selector

protected GMS_MessageSelector m_selector
Constructor Detail

GMS_SubscriberImpl

public GMS_SubscriberImpl(com.anabas.ibus.TopicSubscriber sub,
                          com.anabas.ibus.TopicSession session,
                          GMS_MessageSelector selector)
Method Detail

convertMessage

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

createMessageSelector

public GMS_MessageSelector createMessageSelector(java.lang.String name)
Creates an instance of the specified message selector type. The name must be the name of cone of the message selector instances without the package name. For example UserSelector.
Specified by:
createMessageSelector in interface GMS_StreamSubscriber
Parameters:
name - The Class name (w/o package name. Assumes com.anabas.gxo) of the messagee selector to create.

setSelector

public void setSelector(GMS_MessageSelector s)
                 throws GXO_Exception
Sets the message filter for the subscriber. Best if the filter is implemented on the server side.
Specified by:
setSelector in interface GMS_StreamSubscriber
Tags copied from interface: GMS_StreamSubscriber
Throws:
AccessDeniedException - The message selector or part of it violates security constraints.

setMessageListener

public void setMessageListener(GMS_MessageListener m)
                        throws GXO_Exception
Set a listener for asychronous reception of messages.
Specified by:
setMessageListener in interface GMS_StreamSubscriber

receiveMessage

public GMS_Message receiveMessage()
                           throws GXO_MessageException
Synchronous reception of messages.
Specified by:
receiveMessage in interface GMS_StreamSubscriber
Returns:
null if an error occurs.