|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--net.directj.csf.ServerFactory
|
+--net.directj.csf.impl.ServerFactoryImpl
This class is used to easely create servers. It is quite simple, but can manage a lot of server'type, like SSL or TLS server. To change the type of the created server, you may use the getSupportedType(), getSupportedTypeDescription() and setServerType() methods.
| Field Summary | |
static java.lang.String |
JLOGGER
The "jlogger" server type. |
static java.lang.String |
JLOGGER_DESC
The "standard" server type. |
static java.lang.String |
STANDARD
The "standard" server type. |
static java.lang.String |
STANDARD_DESC
The "standard" server type. |
static java.lang.String[] |
SUPPORTED_TYPE
The array of suppported server type. |
static java.lang.String[] |
SUPPORTED_TYPE_DESC
The array of suppported server type description. |
private java.lang.String |
type
The current server type. |
| Fields inherited from class net.directj.csf.ServerFactory |
|
| Constructor Summary | |
ServerFactoryImpl()
|
|
| Method Summary | |
Server |
createServer()
Creates a new server. |
Server |
createServer(java.lang.String _name,
int _port)
Creates a new server. |
Server |
createServer(java.lang.String _name,
int _port,
int _maxClient)
Creates a new server. |
Server |
createServer(java.lang.String _name,
int _port,
int _maxClient,
java.net.InetAddress _address)
Creates a new server. |
java.lang.String[] |
getSupportedType()
Returns the list of server type supported by this factory. |
java.lang.String[] |
getSupportedTypeDescription()
Returns the description of the different supported type. |
void |
setServerType(java.lang.String _type)
Changes the type of the server that will be created with the createServer method. |
| Methods inherited from class net.directj.csf.ServerFactory |
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 JLOGGER
public static final java.lang.String JLOGGER_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 ServerFactoryImpl()
| Method Detail |
public java.lang.String[] getSupportedType()
getSupportedType in class ServerFactoryString[] - An array of string that indicate the list of supported server type.The description method.public java.lang.String[] getSupportedTypeDescription()
getSupportedTypeDescription in class ServerFactoryString[] - An array of string that describe the supported server type.The server type method.
public void setServerType(java.lang.String _type)
throws java.lang.IllegalArgumentException
setServerType in class ServerFactory_type - The server's type.
java.lang.IllegalArgumentException - If the specified type is not a valid server's type.The method to check the valid type.public Server createServer()
createServer in class ServerFactoryServer - A new client server.
public Server createServer(java.lang.String _name,
int _port)
throws java.lang.IllegalArgumentException
createServer in class ServerFactory_name - The server's name._port - The server's port.
Server - A new server.
java.lang.IllegalArgumentException - If a specified paramters is not valid.
public Server createServer(java.lang.String _name,
int _port,
int _maxClient)
throws java.lang.IllegalArgumentException
createServer in class ServerFactory_name - The server's name._port - The server's port._maxClient - The maximum amount of client the server can handle.
Server - A new server.
java.lang.IllegalArgumentException - If a specified paramters is not valid.
public Server createServer(java.lang.String _name,
int _port,
int _maxClient,
java.net.InetAddress _address)
throws java.lang.IllegalArgumentException
createServer in class ServerFactory_name - The server's name._port - The server's port._maxClient - The maximum amount of client the server can handle._address - The server's address.
Server - A new server.
java.lang.IllegalArgumentException - If a specified paramters is not valid.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||