|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ascert.comms.x25.X25SocketFactory
Convenience class for creating X.25 sockets using driver specific X25Factory
implementations.
Field Summary | |
protected X25Factory |
impl
Driver specific factory implementation to be used for creating X.25 sockets |
Constructor Summary | |
X25SocketFactory(X25Factory impl)
Constructor a new X25SocketFactory using either the supplied X25Factory implementation, or the default value if the supplied value is null . |
Method Summary | |
X25Socket |
getClientSocket(java.lang.String remoteAddr)
Creates a new X.25 client socket connected to a specific remote NUA. |
X25Socket |
getServerSocket(java.lang.String localAddr)
Creates a new X.25 server socket bound to a specific local NUA, and ready to X25Socket.accept() incoming connections. |
X25Socket |
getSocket()
Creates a new X.25 socket using the factory implementation supplied at construction time. |
static void |
setDefaultX25Factory(X25Factory impl)
Sets the default X25Factory to be used for constructing X.25 socket objects where no specific driver factory is used. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected X25Factory impl
Constructor Detail |
public X25SocketFactory(X25Factory impl)
X25SocketFactory
using either the supplied X25Factory
implementation, or the default value if the supplied value is null
.
impl
- specific X25Factory
implementation to use for socket creation, or null if the default is to be usedMethod Detail |
public X25Socket getClientSocket(java.lang.String remoteAddr) throws java.io.IOException
remoteAddr
- remote NUA to connect to
java.io.IOException
- if an error occurs creating the socket or connecting to the NUApublic X25Socket getServerSocket(java.lang.String localAddr) throws java.io.IOException
X25Socket.accept()
incoming connections.
localAddr
- local address to listen for incoming connections
java.io.IOException
- if an error occurs creating or initialising the server socketpublic X25Socket getSocket() throws java.io.IOException
java.io.IOException
- if an error occurs constructing the socketpublic static void setDefaultX25Factory(X25Factory impl)
X25Factory
to be used for constructing X.25 socket objects where no specific driver factory is used. On initial loading of the X25SocketFactory
class an attempt will be made to set the default value using the fully qualified class name specific in the X25Factory.FACTORY_CLASS_PROPERTY
System property.
impl
- The new default X25Factory value
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |