org.huihoo.jfox.ms.crb
Interface LinkServer

All Known Subinterfaces:
LinkServerRemote
All Known Implementing Classes:
RMILinkServer, SocketLinkServer

public interface LinkServer

Defines the methods that can be called by a client on the server.

Version:
@created July 23th 2003
Author:
Liang.Zhao (zlushangnwpu@sina.com)

Method Summary
 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
 LinkServer cloneLinkServer()
           
 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 sendMessage(javax.jms.Message message)
          Send a message to the destination specifyed in the message.
 

Method Detail

cloneLinkServer

public LinkServer cloneLinkServer()
                           throws java.lang.Exception
Returns:
LinkServer
Throws:
java.lang.Exception

getID

public java.lang.String getID()
                       throws java.lang.Exception
Get a clientID from the server.

Returns:
an internally generated clientID.
Throws:
java.lang.Exception

createTemporaryTopic

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

Returns:
TemporaryTopic
Throws:
java.lang.Exception

createTemporaryQueue

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

Returns:
TemporaryQueue
Throws:
java.lang.Exception

closeConnection

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

Throws:
java.lang.Exception

checkID

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

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.

Throws:
java.lang.Exception

createQueue

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

Returns:
Queue
Throws:
java.lang.Exception

createTopic

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

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

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

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.

Returns:
Message
Throws:
java.lang.Exception

authenticate

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

Returns:
boolean
Throws:
java.lang.Exception


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