org.huihoo.jfox.ms.crb
Class TestInterceptor

java.lang.Object
  extended byorg.huihoo.jfox.ms.crb.TestInterceptor
All Implemented Interfaces:
Interceptor

public class TestInterceptor
extends java.lang.Object
implements Interceptor

only for test


Constructor Summary
TestInterceptor()
           
 
Method Summary
 void addSubscriber()
           
 boolean authenticate(java.lang.String userName, java.lang.String password)
          Authenticate the user.
 javax.jms.Message[] browse(javax.jms.Destination destination, java.lang.String selector)
          Browse message on given destination
 void checkID(java.lang.String ID)
          Check if clientID is a valid ID
 void closeConnection()
          The client close the connection.
 javax.jms.Queue createQueue(java.lang.String destination)
          Create a queue identity
 javax.jms.TemporaryQueue createTemporaryQueue()
          Gets the TemporaryQueue
 javax.jms.TemporaryTopic createTemporaryTopic()
          Gets the TemporaryTopic
 javax.jms.Topic createTopic(java.lang.String destination)
          Create a topic identity
 void deleteTemporaryDestination(javax.jms.Destination destination)
          Delete a temporary destination from server
 java.lang.String getID()
          Get a clientID from the server.
 javax.jms.Message receiveMessage(javax.jms.Destination destination, long wait)
          Receive a message synchronously.
 void removeSubscriber()
          Remove a subcriber.
 void sendMessage(javax.jms.Message message)
          Send a message to the destination specifyed in the message.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TestInterceptor

public TestInterceptor()
Method Detail

getID

public java.lang.String getID()
                       throws java.lang.Exception
Description copied from interface: Interceptor
Get a clientID from the server.

Specified by:
getID in interface Interceptor
Returns:
an internally generated clientID.
Throws:
java.lang.Exception

createTemporaryTopic

public javax.jms.TemporaryTopic createTemporaryTopic()
                                              throws java.lang.Exception
Gets the TemporaryTopic

Specified by:
createTemporaryTopic in interface Interceptor
Returns:
TemporaryTopic
Throws:
java.lang.Exception

createTemporaryQueue

public javax.jms.TemporaryQueue createTemporaryQueue()
                                              throws java.lang.Exception
Gets the TemporaryQueue

Specified by:
createTemporaryQueue in interface Interceptor
Returns:
TemporaryQueue
Throws:
java.lang.Exception

closeConnection

public void closeConnection()
                     throws java.lang.Exception
The client close the connection.

Specified by:
closeConnection in interface Interceptor
Throws:
java.lang.Exception

checkID

public void checkID(java.lang.String ID)
             throws java.lang.Exception
Check if clientID is a valid ID

Specified by:
checkID in interface Interceptor
Throws:
java.lang.Exception

sendMessage

public void sendMessage(javax.jms.Message message)
                 throws java.lang.Exception
Send a message to the destination specifyed in the message.

Specified by:
sendMessage in interface Interceptor
Throws:
java.lang.Exception

createQueue

public javax.jms.Queue createQueue(java.lang.String destination)
                            throws java.lang.Exception
Create a queue identity

Specified by:
createQueue in interface Interceptor
Returns:
Queue
Throws:
java.lang.Exception

createTopic

public javax.jms.Topic createTopic(java.lang.String destination)
                            throws java.lang.Exception
Create a topic identity

Specified by:
createTopic in interface Interceptor
Parameters:
destination -
Returns:
Topic
Throws:
java.lang.Exception

deleteTemporaryDestination

public void deleteTemporaryDestination(javax.jms.Destination destination)
                                throws java.lang.Exception
Delete a temporary destination from server

Specified by:
deleteTemporaryDestination in interface Interceptor
Throws:
java.lang.Exception

browse

public javax.jms.Message[] browse(javax.jms.Destination destination,
                                  java.lang.String selector)
                           throws java.lang.Exception
Browse message on given destination

Specified by:
browse in interface Interceptor
Returns:
Message[]
Throws:
java.lang.Exception

receiveMessage

public javax.jms.Message receiveMessage(javax.jms.Destination destination,
                                        long wait)
                                 throws java.lang.Exception
Receive a message synchronously.

Specified by:
receiveMessage in interface Interceptor
Returns:
Message
Throws:
java.lang.Exception

removeSubscriber

public void removeSubscriber()
                      throws java.lang.Exception
Remove a subcriber.

Specified by:
removeSubscriber in interface Interceptor
Throws:
java.lang.Exception - Description of Exception

authenticate

public boolean authenticate(java.lang.String userName,
                            java.lang.String password)
                     throws java.lang.Exception
Authenticate the user.

Specified by:
authenticate in interface Interceptor
Returns:
boolean
Throws:
java.lang.Exception

addSubscriber

public void addSubscriber()
                   throws java.lang.Exception
Specified by:
addSubscriber in interface Interceptor
Throws:
java.lang.Exception - The exception description.


Copyright © 2002-2003 Open Enterprise Foundation. All Rights Reserved.