|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--disciple.connections.TcpConnectionFactory
Factory to create TcpConnection's.
Default environment variables are:
| host | remote host address |
| port | remote host port number |
| priority.levels | priority levels of outgoing commands (default=3) |
Copyright (c) 2003 Rutgers, The State University of New Jersey
| Constructor Summary | |
TcpConnectionFactory()
|
|
TcpConnectionFactory(java.util.Hashtable env)
|
|
TcpConnectionFactory(java.lang.String host,
int port)
|
|
| 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. |
protected java.net.Socket |
createSocket()
Creates a socket connection to the remote server. |
java.util.Hashtable |
getEnvironment()
|
int |
getProperty(java.lang.String name,
int defaultValue)
Convenience method to get int properties from the environment. |
java.lang.Object |
removeFromEnvironment(java.lang.String propName)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public TcpConnectionFactory()
public TcpConnectionFactory(java.util.Hashtable env)
public TcpConnectionFactory(java.lang.String host,
int port)
| Method Detail |
public Connection createConnection()
throws java.lang.Exception
ConnectionFactory
createConnection in interface ConnectionFactoryjava.lang.Exception
public Connection createConnection(java.lang.String name,
java.lang.String password)
throws java.lang.Exception
ConnectionFactory
createConnection in interface ConnectionFactoryname - password -
java.lang.Exception
public java.lang.Object addToEnvironment(java.lang.String propName,
java.lang.Object propVal)
addToEnvironment in interface ConnectionFactorypropName - propVal -
public java.lang.Object removeFromEnvironment(java.lang.String propName)
removeFromEnvironment in interface ConnectionFactorypropName -
public java.util.Hashtable getEnvironment()
getEnvironment in interface ConnectionFactory
public int getProperty(java.lang.String name,
int defaultValue)
protected java.net.Socket createSocket()
throws java.io.IOException
java.io.IOException - if connection could not be established
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||