org.huihoo.jfox.ms.crb.rmi
Class RMILinkServer

java.lang.Object
  extended byjava.rmi.server.RemoteObject
      extended byjava.rmi.server.RemoteServer
          extended byjava.rmi.server.UnicastRemoteObject
              extended byorg.huihoo.jfox.ms.crb.rmi.RMILinkServer
All Implemented Interfaces:
LinkServer, LinkServerRemote, java.rmi.Remote, java.io.Serializable

public class RMILinkServer
extends java.rmi.server.UnicastRemoteObject
implements LinkServerRemote

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

Version:
Author:
Liang.Zhao (zlushangnwpu@sina.com)
See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.rmi.server.RemoteObject
ref
 
Constructor Summary
RMILinkServer(Interceptor s, int RMIPort)
          Constructor for the RMILinkServer object
 
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()
          not finished
 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.
static void main(java.lang.String[] args)
          only for test
 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.rmi.server.UnicastRemoteObject
clone, exportObject, exportObject, exportObject, unexportObject
 
Methods inherited from class java.rmi.server.RemoteServer
getClientHost, getLog, setLog
 
Methods inherited from class java.rmi.server.RemoteObject
equals, getRef, hashCode, toString, toStub
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RMILinkServer

public RMILinkServer(Interceptor s,
                     int RMIPort)
              throws java.rmi.RemoteException
Constructor for the RMILinkServer object

Method Detail

cloneLinkServer

public LinkServer cloneLinkServer()
                           throws java.lang.Exception
Specified by:
cloneLinkServer in interface LinkServer
Returns:
LinkServer
Throws:
java.lang.Exception

getID

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

Specified by:
getID in interface LinkServer
Returns:
String 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 LinkServer
Returns:
TemporaryTopic
Throws:
java.lang.Exception

createTemporaryQueue

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

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

closeConnection

public void closeConnection()
                     throws javax.jms.JMSException
not finished

Specified by:
closeConnection in interface LinkServer
Throws:
javax.jms.JMSException - Description of 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 LinkServer
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 LinkServer
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 LinkServer
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 LinkServer
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 LinkServer
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 LinkServer
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 LinkServer
Returns:
Message
Throws:
java.lang.Exception

removeSubscriber

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

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 LinkServer
Returns:
boolean
Throws:
java.lang.Exception

main

public static void main(java.lang.String[] args)
only for test



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