|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.continuent.tungsten.common.sockets.ServerSocketService
public class ServerSocketService
Provides a wrapper for managing server-side Socket connections. This class encapsulates SSL vs. non-SSL operation, and closing the connection. The code assumes properties required for SSL operation have been previously set before SSL sockets are allocated.
| Constructor Summary | |
|---|---|
ServerSocketService()
Creates a new wrapper for client connections. |
|
| Method Summary | |
|---|---|
SocketWrapper |
accept()
Accepts a connection the server socket. |
java.net.ServerSocket |
bind()
Connect to the server socket. |
void |
close()
Close server socket. |
java.net.InetSocketAddress |
getAddress()
|
int |
getLocalPort()
|
java.net.ServerSocket |
getServerSocket()
Returns the server socket. |
boolean |
isUseSSL()
|
void |
setAcceptTimeout(int acceptTimeout)
Time in milliseconds before timeout to check for termination when accepting connections. |
void |
setAddress(java.net.InetSocketAddress address)
Sets the address to which we should connect. |
void |
setUseSSL(boolean useSSL)
If set to true, use an SSL socket, otherwise use plain TCP/IP. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ServerSocketService()
| Method Detail |
|---|
public java.net.InetSocketAddress getAddress()
public void setAddress(java.net.InetSocketAddress address)
public boolean isUseSSL()
public void setUseSSL(boolean useSSL)
public int getLocalPort()
public void setAcceptTimeout(int acceptTimeout)
public java.net.ServerSocket bind()
throws java.io.IOException
java.io.IOException
public SocketWrapper accept()
throws java.io.IOException
SocketTerminationException - Thrown if the server socket has been
terminated by a call to close()
java.io.IOException - Thrown if a generic exception occurs during I/Opublic java.net.ServerSocket getServerSocket()
public void close()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||