disciple.core
Interface ConnectionFactory

All Known Implementing Classes:
TcpConnectionFactory

public interface ConnectionFactory

A ConnectionFactory is used to create connections to remote peers (e.g. servers). When using JNDI, a ConnectionFactory object is returned by the lookup service, with the properties as defined in the JNDI initial context.


Method Summary
 java.lang.Object addToEnvironment(java.lang.String propName, java.lang.Object propVal)
           
 Connection createConnection()
          Creates a connection with the default user identity.
 Connection createConnection(java.lang.String name, java.lang.String password)
          Creates a connection with the specified user identity.
 java.util.Hashtable getEnvironment()
           
 java.lang.Object removeFromEnvironment(java.lang.String propName)
           
 

Method Detail

createConnection

public Connection createConnection()
                            throws java.lang.Exception
Creates a connection with the default user identity.

Returns:
Connection
Throws:
java.lang.Exception - if the connection coould not be established
Rose:
3D08CC2D021D

createConnection

public Connection createConnection(java.lang.String name,
                                   java.lang.String password)
                            throws java.lang.Exception
Creates a connection with the specified user identity.

Parameters:
name -
password -
Returns:
Connection
Throws:
java.lang.Exception - if the connection coould not be established
Rose:
3D08CC4002E3

addToEnvironment

public java.lang.Object addToEnvironment(java.lang.String propName,
                                         java.lang.Object propVal)
Parameters:
propName -
propVal -
Returns:
Object
Since:
Disciple v3.0

removeFromEnvironment

public java.lang.Object removeFromEnvironment(java.lang.String propName)
Parameters:
propName -
Returns:
Object
Since:
Disciple v3.0

getEnvironment

public java.util.Hashtable getEnvironment()
Returns:
Hashtable
Since:
Disciple v3.0


Copyright (c) 2003 Rutgers, The State University of New Jersey