org.exolab.jms.server.rmi
Class RmiJmsServer
java.lang.Object
|
+--java.rmi.server.RemoteObject
|
+--java.rmi.server.RemoteServer
|
+--java.rmi.server.UnicastRemoteObject
|
+--org.exolab.jms.server.rmi.RmiJmsServer
- All Implemented Interfaces:
- JmsServerIfc, java.rmi.Remote, RemoteJmsServerIfc, java.io.Serializable
- public class RmiJmsServer
- extends java.rmi.server.UnicastRemoteObject
- implements JmsServerIfc, RemoteJmsServerIfc
This class implements the JmsServerIfc and provides an RMI-based JMS Server.
When then client calls init control is passed to this class instance until
the server terminates (normally or abnormally).
- Version:
- $Revision: 1.23 $ $Date: 2003/08/07 13:33:10 $
- Author:
- Jim Alateras
- See Also:
ConfigurationManager
, Serialized Form
Fields inherited from class java.rmi.server.RemoteObject |
ref |
Constructor Summary |
RmiJmsServer()
The default constructor determines whether or not to run the RMI
registry in embedded mode or not. |
Method Summary |
void |
bindConnectionFactories(javax.naming.Context context)
Bind any factory object specified in the configuration file to the
specified JNDI context. |
RemoteJmsServerConnectionIfc |
createConnection(java.lang.String id,
java.lang.String username,
java.lang.String password)
Create a connection to the specified server. |
protected int |
getClientPingInterval()
Return the client ping interval for this server. |
void |
init()
This routine binds this service with the rmiregistry. |
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 |
RmiJmsServer
public RmiJmsServer()
throws java.rmi.RemoteException
- The default constructor determines whether or not to run the RMI
registry in embedded mode or not. If embedded mode is specified then
register this service with the ServiceManager.
init
public void init()
throws ServerException
- This routine binds this service with the rmiregistry.
When a client needs to use the server it will be automatically
activated by the rmiregistry to handle the request(s). It does expect
that the registry is active when this routine is called.
- Specified by:
init
in interface JmsServerIfc
- Throws:
ServerException
- if the service cannot be bound
bindConnectionFactories
public void bindConnectionFactories(javax.naming.Context context)
throws javax.naming.NamingException
- Bind any factory object specified in the configuration file to the
specified JNDI context.
- Specified by:
bindConnectionFactories
in interface JmsServerIfc
- Parameters:
context
- context to bind factory objects- Throws:
javax.naming.NamingException
- if a naming error occurs
createConnection
public RemoteJmsServerConnectionIfc createConnection(java.lang.String id,
java.lang.String username,
java.lang.String password)
throws javax.jms.JMSException,
java.rmi.RemoteException
- Create a connection to the specified server. This will create an
instance of a JmsServerConnection and then return a remote reference
to it.
- Specified by:
createConnection
in interface RemoteJmsServerIfc
- Parameters:
id
- client identityusername
- the client's user namepassword
- the client's password- Returns:
- a new connection
- Throws:
javax.jms.JMSException
- if the connection cannot be createdjava.rmi.RemoteException
- if the connection cannot be created
getClientPingInterval
protected int getClientPingInterval()
- Return the client ping interval for this server. This interval is used
to determine when clients are no longer available.
Copyright © 1999-2004 The OpenJMS Group. All Rights Reserved.