public class SocketEndPoint extends StreamEndPoint
| Modifier | Constructor and Description |
|---|---|
|
SocketEndPoint(java.net.Socket socket) |
protected |
SocketEndPoint(java.net.Socket socket,
int maxIdleTime) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close any backing stream associated with the endpoint
|
java.lang.String |
getLocalAddr() |
java.lang.String |
getLocalHost() |
int |
getLocalPort() |
java.lang.String |
getRemoteAddr() |
java.lang.String |
getRemoteHost() |
int |
getRemotePort() |
java.lang.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() |
java.lang.String |
toString() |
blockReadable, blockWritable, fill, flush, flush, flush, getInputStream, getMaxIdleTime, getOutputStream, isBlocking, isClosed, setInputStream, setOutputStreampublic SocketEndPoint(java.net.Socket socket)
throws java.io.IOException
java.io.IOExceptionprotected SocketEndPoint(java.net.Socket socket,
int maxIdleTime)
throws java.io.IOException
java.io.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 java.io.IOException
java.io.IOExceptionpublic void shutdownOutput()
throws java.io.IOException
EndPointshutdownOutput in interface EndPointshutdownOutput in class StreamEndPointjava.io.IOExceptionpublic void shutdownSocketInput()
throws java.io.IOException
java.io.IOExceptionpublic void shutdownInput()
throws java.io.IOException
EndPointshutdownInput in interface EndPointshutdownInput in class StreamEndPointjava.io.IOExceptionpublic void close()
throws java.io.IOException
EndPointclose in interface EndPointclose in class StreamEndPointjava.io.IOExceptionpublic java.lang.String getLocalAddr()
getLocalAddr in interface EndPointgetLocalAddr in class StreamEndPointEndPoint is bound, or null
if this EndPoint does not represent a network connection.public java.lang.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 java.lang.String getRemoteAddr()
getRemoteAddr in interface EndPointgetRemoteAddr in class StreamEndPointEndPoint is connected, or null
if this EndPoint does not represent a network connection.public java.lang.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 java.lang.Object getTransport()
getTransport in interface EndPointgetTransport in class StreamEndPointpublic void setMaxIdleTime(int timeMs)
throws java.io.IOException
EndPointsetMaxIdleTime in interface EndPointsetMaxIdleTime in class StreamEndPointtimeMs - the max idle time in MS. Timeout <= 0 implies an infinite timeoutjava.io.IOException - if the timeout cannot be set.StreamEndPoint.setMaxIdleTime(int)protected void idleExpired()
throws java.io.IOException
idleExpired in class StreamEndPointjava.io.IOExceptionpublic java.lang.String toString()
toString in class java.lang.ObjectCopyright © 2013 FuseSource, Corp.. All Rights Reserved.