|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--net.directj.csf.ClientFactory
This class is used to easely create clients. It is quite simple, but can manage a lot of client'type, like SSL or TLS server. To change the type of the created client, you may use the getSupportedType(), getSupportedTypeDescription() and setClientType() methods.
Field Summary | |
private static ClientFactory |
instance
the factory single instance. |
Constructor Summary | |
protected |
ClientFactory()
Forbids direct instanciation. |
Method Summary | |
abstract Client |
createClient(int _port,
java.net.InetAddress _address)
Creates a new client. |
static ClientFactory |
getDefault()
Returs the default factory. |
abstract java.lang.String[] |
getSupportedType()
Returns the list of client type supported by this factory. |
abstract java.lang.String[] |
getSupportedTypeDescription()
Returns the description of the different supported type. |
abstract void |
setClientType(java.lang.String _type)
Changes the type of the client that will be created with the createServer method. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static ClientFactory instance
Constructor Detail |
protected ClientFactory()
Method Detail |
public abstract java.lang.String[] getSupportedType()
String[]
- An array of string that indicate the list of supported client type.The description method.
public abstract java.lang.String[] getSupportedTypeDescription()
String[]
- An array of string that describe the supported client type.The client type method.
public abstract void setClientType(java.lang.String _type) throws java.lang.IllegalArgumentException
_type
- The client's type.
java.lang.IllegalArgumentException
- If the specified type is not a valid client's type.The method to check the valid type.
public static ClientFactory getDefault()
ClientFactory
- The default ClientFactory.public abstract Client createClient(int _port, java.net.InetAddress _address) throws java.lang.IllegalArgumentException
_port
- The server's port, where the client will bind to._address
- The server's address, where the client will bind to.
Client
- A new client.
java.lang.IllegalArgumentException
- If a specified parameters is not valid.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |