org.exolab.jms.client
Class JmsConnectionFactory

java.lang.Object
  |
  +--org.exolab.jms.client.JmsConnectionFactory
All Implemented Interfaces:
javax.jms.ConnectionFactory, javax.jms.ExceptionListener, java.io.Externalizable, javax.naming.Referenceable, java.io.Serializable
Direct Known Subclasses:
JmsQueueConnectionFactory, JmsTopicConnectionFactory

public abstract class JmsConnectionFactory
extends java.lang.Object
implements javax.jms.ConnectionFactory, javax.jms.ExceptionListener, java.io.Externalizable, javax.naming.Referenceable

This is simply a marker for connection factory classes.

Version:
$Revision: 1.19 $ $Date: 2003/08/07 13:32:49 $
Author:
Jim Alateras, Tim Anderson
See Also:
JmsQueueConnectionFactory, 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(org.exolab.jms.client.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
 JmsServerStubIfc getProxy()
          Return a reference to the server proxy.
 javax.naming.Reference getReference()
           
protected  boolean isManaged(org.exolab.jms.client.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(org.exolab.jms.client.JmsConnection connection)
          Remove the specified connection from the list of managed connections..
 void writeExternal(java.io.ObjectOutput stream)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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.
Returns:
a reference to the server proxy
Throws:
javax.jms.JMSException - if the proxy cannot be created

addConnection

protected void addConnection(org.exolab.jms.client.JmsConnection connection)
Add the specified connection to the list of managed sessions
Parameters:
connection - connection to register

removeConnection

protected void removeConnection(org.exolab.jms.client.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(org.exolab.jms.client.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

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)
Specified by:
onException in interface javax.jms.ExceptionListener

getReference

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


Copyright © 1999-2004 The OpenJMS Group. All Rights Reserved.