org.jboss.mq.server
Interface JMSServerInterceptor

All Known Implementing Classes:
JMSServerInterceptorSupport (src)

public interface JMSServerInterceptor

Interceptor interface for clients IL accessing the JMSServer. Using an iterface for this layer makes it possible to put in logic without having to modify the server objet. And also makes this pluggable.


Method Summary
 void acknowledge(ConnectionToken (src)  dc, AcknowledgementRequest (src)  item)
          #Description of the Method
 void addMessage(ConnectionToken (src)  dc, SpyMessage (src)  message)
          Add the message to the destination.
 java.lang.String authenticate(java.lang.String userName, java.lang.String password)
          Check user for autentication.
 SpyMessage (src) [] browse(ConnectionToken (src)  dc, Destination (src)  dest, java.lang.String selector)
          #Description of the Method
 void checkID(java.lang.String ID)
          Check id, must not be taken.
 java.lang.String checkUser(java.lang.String userName, java.lang.String password)
          Check user for autentication.
 void connectionClosing(ConnectionToken (src)  dc)
          Close connection.
 Queue (src) createQueue(ConnectionToken (src)  dc, java.lang.String dest)
          Create a queue.
 Topic (src) createTopic(ConnectionToken (src)  dc, java.lang.String dest)
          Create a topic.
 void deleteTemporaryDestination(ConnectionToken (src)  dc, SpyDestination (src)  dest)
          #Description of the Method
 void destroySubscription(ConnectionToken (src)  dc, DurableSubscriptionID (src)  id)
          Unsubscribe from the durable subscription.
 SpyTopic (src) getDurableTopic(DurableSubscriptionID (src)  sub)
          Get the topic the durable subscription is on.
 java.lang.String getID()
          Gets a clientID from server.
 JMSServerInterceptor (src) getNext()
          Get next invoker in chain to be called.
 Subscription (src) getSubscription(ConnectionToken (src)  dc, int subscriberId)
          Get the subscription that match the id.
 TemporaryQueue (src) getTemporaryQueue(ConnectionToken (src)  dc)
          Get a temporary queue
 TemporaryTopic (src) getTemporaryTopic(ConnectionToken (src)  dc)
          Get a temporary topic.
 java.lang.ThreadGroup getThreadGroup()
          Get the thread group of the server.
 void ping(ConnectionToken (src)  dc, long clientTime)
          Ping the server.
 SpyMessage (src) receive(ConnectionToken (src)  dc, int subscriberId, long wait)
          #Description of the Method
 void setEnabled(ConnectionToken (src)  dc, boolean enabled)
          Sets the Enabled attribute of the ServerIL object
 void setNext(JMSServerInterceptor (src)  server)
          Set next Interceptor in chain to be called.
 void subscribe(ConnectionToken (src)  dc, Subscription (src)  s)
           
 void transact(ConnectionToken (src)  dc, TransactionRequest (src)  t)
          #Description of the Method
 void unsubscribe(ConnectionToken (src)  dc, int subscriptionId)
          Close the server side message consumer.
 

Method Detail

setNext

public void setNext(JMSServerInterceptor (src)  server)
Set next Interceptor in chain to be called. Is mot often the real JMSServer


getNext

public JMSServerInterceptor (src)  getNext()
Get next invoker in chain to be called. Is mot often the real JMSServer


getThreadGroup

public java.lang.ThreadGroup getThreadGroup()
Get the thread group of the server.


getID

public java.lang.String getID()
                       throws JMSException (src) 
Gets a clientID from server.

Returns:
The ID value
Throws:
JMSException (src) - Description of Exception

getTemporaryTopic

public TemporaryTopic (src)  getTemporaryTopic(ConnectionToken (src)  dc)
                                 throws JMSException (src) 
Get a temporary topic.

Parameters:
dc - Description of Parameter
Returns:
The TemporaryTopic value
Throws:
JMSException (src) - Description of Exception

getTemporaryQueue

public TemporaryQueue (src)  getTemporaryQueue(ConnectionToken (src)  dc)
                                 throws JMSException (src) 
Get a temporary queue

Parameters:
dc - Description of Parameter
Returns:
The TemporaryQueue value
Throws:
JMSException (src) - Description of Exception

connectionClosing

public void connectionClosing(ConnectionToken (src)  dc)
                       throws JMSException (src) 
Close connection.

Parameters:
dc - Description of Parameter
Throws:
JMSException (src) - Description of Exception

checkID

public void checkID(java.lang.String ID)
             throws JMSException (src) 
Check id, must not be taken.

Parameters:
ID - Description of Parameter
Throws:
JMSException (src) - Description of Exception

addMessage

public void addMessage(ConnectionToken (src)  dc,
                       SpyMessage (src)  message)
                throws JMSException (src) 
Add the message to the destination.

Parameters:
dc - The feature to be added to the Message attribute
message - The feature to be added to the Message attribute
Throws:
JMSException (src) - Description of Exception

createQueue

public Queue (src)  createQueue(ConnectionToken (src)  dc,
                         java.lang.String dest)
                  throws JMSException (src) 
Create a queue. The destination name must be the name of an already existing destination. This method should only be used to skip looking up a destination through JNDI, not to actually create a new destination.

Parameters:
dc - Description of Parameter
dest - Description of Parameter
Returns:
Description of the Returned Value
Throws:
JMSException (src) - Description of Exception

createTopic

public Topic (src)  createTopic(ConnectionToken (src)  dc,
                         java.lang.String dest)
                  throws JMSException (src) 
Create a topic. The destination name must be the name of an already existing destination. This method should only be used to skip looking up a destination through JNDI, not to actually create a new destination.

Parameters:
dc - Description of Parameter
dest - Description of Parameter
Returns:
Description of the Returned Value
Throws:
JMSException (src) - Description of Exception

deleteTemporaryDestination

public void deleteTemporaryDestination(ConnectionToken (src)  dc,
                                       SpyDestination (src)  dest)
                                throws JMSException (src) 
#Description of the Method

Parameters:
dc - Description of Parameter
dest - Description of Parameter
Throws:
JMSException (src) - Description of Exception

transact

public void transact(ConnectionToken (src)  dc,
                     TransactionRequest (src)  t)
              throws JMSException (src) 
#Description of the Method

Parameters:
dc - Description of Parameter
t - Description of Parameter
Throws:
JMSException (src) - Description of Exception

acknowledge

public void acknowledge(ConnectionToken (src)  dc,
                        AcknowledgementRequest (src)  item)
                 throws JMSException (src) 
#Description of the Method

Parameters:
dc - Description of Parameter
item - Description of Parameter
Throws:
JMSException (src) - Description of Exception

browse

public SpyMessage (src) [] browse(ConnectionToken (src)  dc,
                           Destination (src)  dest,
                           java.lang.String selector)
                    throws JMSException (src) 
#Description of the Method

Parameters:
dc - Description of Parameter
dest - Description of Parameter
selector - Description of Parameter
Returns:
Description of the Returned Value
Throws:
JMSException (src) - Description of Exception

receive

public SpyMessage (src)  receive(ConnectionToken (src)  dc,
                          int subscriberId,
                          long wait)
                   throws JMSException (src) 
#Description of the Method

Parameters:
dc - Description of Parameter
subscriberId - Description of Parameter
wait - Description of Parameter
Returns:
Description of the Returned Value
Throws:
JMSException (src) - Description of Exception

setEnabled

public void setEnabled(ConnectionToken (src)  dc,
                       boolean enabled)
                throws JMSException (src) 
Sets the Enabled attribute of the ServerIL object

Parameters:
dc - The new Enabled value
enabled - The new Enabled value
Throws:
JMSException (src) - Description of Exception

unsubscribe

public void unsubscribe(ConnectionToken (src)  dc,
                        int subscriptionId)
                 throws JMSException (src) 
Close the server side message consumer. Client is no longer available to receive messages.

Parameters:
dc - Description of Parameter
subscriptionId - Description of Parameter
Throws:
JMSException (src) - Description of Exception

destroySubscription

public void destroySubscription(ConnectionToken (src)  dc,
                                DurableSubscriptionID (src)  id)
                         throws JMSException (src) 
Unsubscribe from the durable subscription.

Parameters:
id - Description of Parameter
Throws:
JMSException (src) - Description of Exception

checkUser

public java.lang.String checkUser(java.lang.String userName,
                                  java.lang.String password)
                           throws JMSException (src) 
Check user for autentication.

Parameters:
userName - Description of Parameter
password - Description of Parameter
Returns:
a preconfigured clientId.
Throws:
JMSException (src) - if user was not allowed to login

authenticate

public java.lang.String authenticate(java.lang.String userName,
                                     java.lang.String password)
                              throws JMSException (src) 
Check user for autentication.

Parameters:
userName - Description of Parameter
password - Description of Parameter
Returns:
a sessionId.
Throws:
JMSException (src) - if user was not allowed to login

subscribe

public void subscribe(ConnectionToken (src)  dc,
                      Subscription (src)  s)
               throws JMSException (src) 
Parameters:
dc - org.jboss.mq.ConnectionToken
s - org.jboss.mq.Subscription
Throws:
JMSException (src) - The exception description.

ping

public void ping(ConnectionToken (src)  dc,
                 long clientTime)
          throws JMSException (src) 
Ping the server.

Parameters:
dc - Description of Parameter
clientTime - Description of Parameter
Throws:
JMSException (src) - Description of Exception

getDurableTopic

public SpyTopic (src)  getDurableTopic(DurableSubscriptionID (src)  sub)
                         throws JMSException (src) 
Get the topic the durable subscription is on. Primary for internal use in the server, and not for the IL's.

Throws:
JMSException (src)

getSubscription

public Subscription (src)  getSubscription(ConnectionToken (src)  dc,
                                    int subscriberId)
                             throws JMSException (src) 
Get the subscription that match the id.

Throws:
JMSException (src) - if it can not find the subscription.