public class SocketEndPoint extends StreamEndPoint
| Modifier | Constructor and Description |
|---|---|
|
SocketEndPoint(Socket socket) |
protected |
SocketEndPoint(Socket socket,
int maxIdleTime) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close any backing stream associated with the endpoint
|
String |
getLocalAddr() |
String |
getLocalHost() |
int |
getLocalPort() |
String |
getRemoteAddr() |
String |
getRemoteHost() |
int |
getRemotePort() |
Object |
getTransport() |
protected void |
idleExpired() |
boolean |
isInputShutdown() |
boolean |
isOpen() |
boolean |
isOutputShutdown() |
void |
setMaxIdleTime(int timeMs)
Set the max idle time.
|
void |
shutdownInput()
Shutdown any backing input stream associated with the endpoint
|
void |
shutdownOutput()
Shutdown any backing output stream associated with the endpoint
|
void |
shutdownSocketInput() |
protected void |
shutdownSocketOutput() |
String |
toString() |
blockReadable, blockWritable, fill, flush, flush, flush, getInputStream, getMaxIdleTime, getOutputStream, isBlocking, isClosed, setInputStream, setOutputStreampublic SocketEndPoint(Socket socket) throws IOException
IOExceptionprotected SocketEndPoint(Socket socket, int maxIdleTime) throws IOException
IOExceptionpublic boolean isOpen()
isOpen in interface EndPointisOpen in class StreamEndPointpublic boolean isInputShutdown()
isInputShutdown in interface EndPointisInputShutdown in class StreamEndPointpublic boolean isOutputShutdown()
isOutputShutdown in interface EndPointisOutputShutdown in class StreamEndPointprotected final void shutdownSocketOutput()
throws IOException
IOExceptionpublic void shutdownOutput()
throws IOException
EndPointshutdownOutput in interface EndPointshutdownOutput in class StreamEndPointIOExceptionpublic void shutdownSocketInput()
throws IOException
IOExceptionpublic void shutdownInput()
throws IOException
EndPointshutdownInput in interface EndPointshutdownInput in class StreamEndPointIOExceptionpublic void close()
throws IOException
EndPointclose in interface EndPointclose in class StreamEndPointIOExceptionpublic String getLocalAddr()
getLocalAddr in interface EndPointgetLocalAddr in class StreamEndPointEndPoint is bound, or null
if this EndPoint does not represent a network connection.public String getLocalHost()
getLocalHost in interface EndPointgetLocalHost in class StreamEndPointEndPoint is bound, or null
if this EndPoint does not represent a network connection.public int getLocalPort()
getLocalPort in interface EndPointgetLocalPort in class StreamEndPointEndPoint is listening, or 0
if this EndPoint does not represent a network connection.public String getRemoteAddr()
getRemoteAddr in interface EndPointgetRemoteAddr in class StreamEndPointEndPoint is connected, or null
if this EndPoint does not represent a network connection.public String getRemoteHost()
getRemoteHost in interface EndPointgetRemoteHost in class StreamEndPointEndPoint is connected, or null
if this EndPoint does not represent a network connection.public int getRemotePort()
getRemotePort in interface EndPointgetRemotePort in class StreamEndPointEndPoint is connected, or 0
if this EndPoint does not represent a network connection.public Object getTransport()
getTransport in interface EndPointgetTransport in class StreamEndPointpublic void setMaxIdleTime(int timeMs)
throws IOException
EndPointsetMaxIdleTime in interface EndPointsetMaxIdleTime in class StreamEndPointtimeMs - the max idle time in MS. Timeout <= 0 implies an infinite timeoutIOException - if the timeout cannot be set.StreamEndPoint.setMaxIdleTime(int)protected void idleExpired()
throws IOException
idleExpired in class StreamEndPointIOExceptionCopyright © 1995-2015 Mort Bay Consulting. All Rights Reserved.