jrun.jms.core.client
Class JmsConnectionFactory

jrun.jms.core.client.JmsConnectionFactory
All Implemented Interfaces:
java.io.Externalizable, javax.naming.Referenceable, java.io.Serializable

public abstract class JmsConnectionFactory
implements java.io.Externalizable, javax.naming.Referenceable

This is simply a marker for connection factory classes.

Version:
$Revision: 1.13 $ $Date: 2001/06/21 20:53:05 $
Author:
Jim Alateras
See Also:
org.exolab.jms.client.JmsQueueConnectionFactory, org.exolab.jms.client.JmsTopicConnectionFactory, Serialized Form

Field Summary
protected  java.lang.String className_
          This variable maintains the name of the class that will facilitate communication with the JMS Server.
protected  java.util.Hashtable env_
          This is a list of environment variabels that are used to construct the object
 
Constructor Summary
  JmsConnectionFactory()
          Need a default constructor for externalization
protected JmsConnectionFactory(java.lang.String name, java.util.Hashtable env)
          Instantiate an instance of the connection factory with the name of the class that will facilitate communication with the JmsServer
 
Method Summary
protected  void addConnection(JmsConnection connection)
          Add the specified connection to the list of managed sessions
protected  java.util.Enumeration getConnections()
          Return an enumeration of all connections managed by this factory
protected  Logger getLogger()
          Return a reference to the logger.
 JmsServerStubIfc getProxy()
          Return a reference to the server proxy.
 javax.naming.Reference getReference()
           
protected  boolean isManaged(JmsConnection connection)
          Test whether the specified connection is managed by this factory
 void onException(javax.jms.JMSException exception)
           
 void readExternal(java.io.ObjectInput stream)
           
protected  void removeConnection(JmsConnection connection)
          Remove the specified connection from the list of managed connections..
 void writeExternal(java.io.ObjectOutput stream)
           
 

Field Detail

className_

protected java.lang.String className_
This variable maintains the name of the class that will facilitate communication with the JMS Server. This class must have a default constructor.

env_

protected java.util.Hashtable env_
This is a list of environment variabels that are used to construct the object
Constructor Detail

JmsConnectionFactory

public JmsConnectionFactory()
Need a default constructor for externalization

JmsConnectionFactory

protected JmsConnectionFactory(java.lang.String name,
                               java.util.Hashtable env)
Instantiate an instance of the connection factory with the name of the class that will facilitate communication with the JmsServer
Parameters:
name - name of the class
envc - properties for contructing
Method Detail

getProxy

public JmsServerStubIfc getProxy()
                          throws javax.jms.JMSException
Return a reference to the server proxy. If the proxy has not yet been created then create it prior to returning.

If there are any problems creating this proxy then throw the JMS- Exception exception

Returns:
JmsServerStubIfc reference to proxy
Throws:
JMSException -  

addConnection

protected void addConnection(JmsConnection connection)
Add the specified connection to the list of managed sessions
Parameters:
connection - connection to register

removeConnection

protected void removeConnection(JmsConnection connection)
Remove the specified connection from the list of managed connections.. If it doesn't exist then fail silently
Parameters:
connection - connection to remove

isManaged

protected boolean isManaged(JmsConnection connection)
Test whether the specified connection is managed by this factory
Parameters:
connection - connection to test against
Returns:
boolean true if managed

getConnections

protected java.util.Enumeration getConnections()
Return an enumeration of all connections managed by this factory
Returns:
Enumeration

getLogger

protected Logger getLogger()
Return a reference to the logger.
Returns:
Logger

writeExternal

public void writeExternal(java.io.ObjectOutput stream)
                   throws java.io.IOException
Specified by:
writeExternal in interface java.io.Externalizable

readExternal

public void readExternal(java.io.ObjectInput stream)
                  throws java.io.IOException,
                         java.lang.ClassNotFoundException
Specified by:
readExternal in interface java.io.Externalizable

onException

public void onException(javax.jms.JMSException exception)

getReference

public javax.naming.Reference getReference()
Specified by:
getReference in interface javax.naming.Referenceable


Copyright � 2002 Macromedia Corporation. All Rights Reserved.