|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.exolab.jms.server.JmsServerConnectionManager
The connection manager is responsible for managing all connections to the JmsServer. The connection manager is a singleton (at this point anyway) that is accessible through the instance class method. It is also responsible for holding a list of connections.
A client uses a client identifier to create a connection and a connection type to identify the connection type- queue or topic.
TODO: Look at leasing connections and timing them out.
JmsServerConnection
, Serialized FormMethod Summary | |
void |
closeConnection(java.lang.String id)
Close the connection associated with a particular client identity. |
JmsServerConnection |
createConnection(java.lang.String id,
java.lang.String username,
java.lang.String password)
Create a connection with the specified client id. |
JmsServerConnection |
getConnection(java.lang.String id)
Return the connection associated with a particular client identity. |
java.util.Iterator |
getConnections()
Return an Enumeration of all the connections currently registered with the connection manager |
org.exolab.core.foundation.HandleIfc |
getHandle()
Return a handle to this event handler for the purpose of storing and restoring it. |
void |
handleEvent(int event,
java.lang.Object callback,
long time)
Handle the specified event, generated by the EventManager . |
static JmsServerConnectionManager |
instance()
The static method returns the singleton instance of the JmsConnectionManager. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static JmsServerConnectionManager instance()
public JmsServerConnection createConnection(java.lang.String id, java.lang.String username, java.lang.String password) throws javax.jms.JMSSecurityException, javax.jms.JMSException
id
- the client identityusername
- the client's usernamepassword
- the client's passwordjavax.jms.JMSSecurityException
- if the client cannot be authenticatedjavax.jms.JMSException
- if the connection cannot be createdpublic java.util.Iterator getConnections()
public JmsServerConnection getConnection(java.lang.String id)
id
- identity of the clientpublic void closeConnection(java.lang.String id)
id
- identity of the clientpublic void handleEvent(int event, java.lang.Object callback, long time)
EventHandler
EventManager
.
The event handler pressumably knows how to handle the callback object
and should cast it appropriately before using it.
This methodshould not throw any exceptions
handleEvent
in interface EventHandler
org.exolab.jms.events.EventHandler
event
- the event to handlecallback
- the callback objecttime
- the absolute time, in ms, that the event
fired.public org.exolab.core.foundation.HandleIfc getHandle()
EventHandler
EventManager
then you must support this
method, otherwise this method can simply return null.getHandle
in interface EventHandler
org.exolab.jms.events.EventHandler
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |