|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--net.directj.csf.ClientFactory | +--net.directj.csf.impl.ClientFactoryImpl
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 | |
static java.lang.String |
STANDARD
The "standard" clienttype. |
static java.lang.String |
STANDARD_DESC
The "standard" client type. |
static java.lang.String[] |
SUPPORTED_TYPE
The array of suppported client type. |
static java.lang.String[] |
SUPPORTED_TYPE_DESC
The array of suppported client type description. |
private java.lang.String |
type
The current server type. |
Fields inherited from class net.directj.csf.ClientFactory |
|
Constructor Summary | |
ClientFactoryImpl()
|
Method Summary | |
Client |
createClient(int _port,
java.net.InetAddress _address)
Creates a new client. |
java.lang.String[] |
getSupportedType()
Returns the list of client type supported by this factory. |
java.lang.String[] |
getSupportedTypeDescription()
Returns the description of the different supported type. |
void |
setClientType(java.lang.String _type)
Changes the type of the client that will be created with the createServer method. |
Methods inherited from class net.directj.csf.ClientFactory |
getDefault |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String STANDARD
public static final java.lang.String STANDARD_DESC
public static final java.lang.String[] SUPPORTED_TYPE
public static final java.lang.String[] SUPPORTED_TYPE_DESC
private java.lang.String type
Constructor Detail |
public ClientFactoryImpl()
Method Detail |
public java.lang.String[] getSupportedType()
getSupportedType
in class ClientFactory
String[]
- An array of string that indicate the list of supported client type.The description method.
public java.lang.String[] getSupportedTypeDescription()
getSupportedTypeDescription
in class ClientFactory
String[]
- An array of string that describe the supported client type.The client type method.
public void setClientType(java.lang.String _type) throws java.lang.IllegalArgumentException
setClientType
in class ClientFactory
_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 Client createClient(int _port, java.net.InetAddress _address) throws java.lang.IllegalArgumentException
createClient
in class ClientFactory
_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 |