Joram ${version}

org.objectweb.joram.client.jms
Class ConnectionFactory

java.lang.Object
  extended byorg.objectweb.joram.client.jms.admin.AdministeredObject
      extended byorg.objectweb.joram.client.jms.ConnectionFactory
All Implemented Interfaces:
javax.jms.ConnectionFactory, javax.naming.Referenceable, java.io.Serializable, fr.dyade.aaa.jndi2.soap.SoapObjectItf
Direct Known Subclasses:
HALocalConnectionFactory, HATcpConnectionFactory, LocalConnectionFactory, QueueConnectionFactory, SoapConnectionFactory, TcpConnectionFactory, TopicConnectionFactory

public abstract class ConnectionFactory
extends AdministeredObject
implements javax.jms.ConnectionFactory

Implements the javax.jms.ConnectionFactory interface.

See Also:
Serialized Form

Field Summary
protected  FactoryParameters params
          Object containing the factory's parameters.
protected  java.lang.String reliableClass
          Reliable class name, for exemple use by ssl.
 
Constructor Summary
ConnectionFactory()
          Constructs an empty ConnectionFactory.
ConnectionFactory(java.lang.String host, int port)
          Constructs a ConnectionFactory dedicated to a given server.
 
Method Summary
 java.util.Hashtable code()
          Codes a ConnectionFactory as a Hashtable for travelling through the SOAP protocol.
 javax.jms.Connection createConnection()
          API method.
abstract  javax.jms.Connection createConnection(java.lang.String name, java.lang.String password)
          API method, implemented according to the communication protocol.
 void decode(java.util.Hashtable h)
          Implements the decode abstract method defined in the fr.dyade.aaa.jndi2.soap.SoapObjectItf interface.
static java.lang.String getDefaultLogin()
          Returns default login name for connection.
static java.lang.String getDefaultPassword()
          Returns the default login password for connection.
 FactoryParameters getParameters()
          Returns the factory's configuration parameters.
 javax.naming.Reference getReference()
          Sets the naming reference of a connection factory.
 void setReliableClass(java.lang.String reliableClass)
           
 java.lang.String toString()
          Returns a string view of the connection factory.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

params

protected FactoryParameters params
Object containing the factory's parameters.


reliableClass

protected java.lang.String reliableClass
Reliable class name, for exemple use by ssl.

Constructor Detail

ConnectionFactory

public ConnectionFactory(java.lang.String host,
                         int port)
Constructs a ConnectionFactory dedicated to a given server.

Parameters:
host - Name or IP address of the server's host.
port - Server's listening port.

ConnectionFactory

public ConnectionFactory()
Constructs an empty ConnectionFactory.

Method Detail

toString

public java.lang.String toString()
Returns a string view of the connection factory.


setReliableClass

public void setReliableClass(java.lang.String reliableClass)

createConnection

public abstract javax.jms.Connection createConnection(java.lang.String name,
                                                      java.lang.String password)
                                               throws javax.jms.JMSException
API method, implemented according to the communication protocol.

Specified by:
createConnection in interface javax.jms.ConnectionFactory
Throws:
JMSSecurityException - If the user identification is incorrect.
java.lang.IllegalStateException - If the server is not listening.
javax.jms.JMSException

getDefaultLogin

public static java.lang.String getDefaultLogin()
Returns default login name for connection. Default value "anonymous" can be adjusted by setting the JoramDfltLogin property.


getDefaultPassword

public static java.lang.String getDefaultPassword()
Returns the default login password for connection. Default value "anonymous" can be adjusted by setting the JoramDfltPassword property.


createConnection

public javax.jms.Connection createConnection()
                                      throws javax.jms.JMSException
API method.

Specified by:
createConnection in interface javax.jms.ConnectionFactory
Throws:
JMSSecurityException - If the default identification is incorrect.
java.lang.IllegalStateException - If the server is not listening.
javax.jms.JMSException

getParameters

public FactoryParameters getParameters()
Returns the factory's configuration parameters.


getReference

public javax.naming.Reference getReference()
                                    throws javax.naming.NamingException
Sets the naming reference of a connection factory.

Specified by:
getReference in interface javax.naming.Referenceable
Overrides:
getReference in class AdministeredObject
Throws:
javax.naming.NamingException

code

public java.util.Hashtable code()
Codes a ConnectionFactory as a Hashtable for travelling through the SOAP protocol.

Specified by:
code in interface fr.dyade.aaa.jndi2.soap.SoapObjectItf

decode

public void decode(java.util.Hashtable h)
Implements the decode abstract method defined in the fr.dyade.aaa.jndi2.soap.SoapObjectItf interface.

Actual implementation of the method is located in the tcp and soap sub classes.

Specified by:
decode in interface fr.dyade.aaa.jndi2.soap.SoapObjectItf

Joram ${version}

Copyright ? 2005 Scalagent - All rights reserved