org.eclipse.jetty.io.bio
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, setOutputStream
public SocketEndPoint(java.net.Socket socket) throws java.io.IOException
java.io.IOException
protected SocketEndPoint(java.net.Socket socket, int maxIdleTime) throws java.io.IOException
java.io.IOException
public boolean isOpen()
isOpen
in interface EndPoint
isOpen
in class StreamEndPoint
public boolean isInputShutdown()
isInputShutdown
in interface EndPoint
isInputShutdown
in class StreamEndPoint
public boolean isOutputShutdown()
isOutputShutdown
in interface EndPoint
isOutputShutdown
in class StreamEndPoint
protected final void shutdownSocketOutput() throws java.io.IOException
java.io.IOException
public void shutdownOutput() throws java.io.IOException
EndPoint
shutdownOutput
in interface EndPoint
shutdownOutput
in class StreamEndPoint
java.io.IOException
public void shutdownSocketInput() throws java.io.IOException
java.io.IOException
public void shutdownInput() throws java.io.IOException
EndPoint
shutdownInput
in interface EndPoint
shutdownInput
in class StreamEndPoint
java.io.IOException
public void close() throws java.io.IOException
EndPoint
close
in interface EndPoint
close
in class StreamEndPoint
java.io.IOException
public java.lang.String getLocalAddr()
getLocalAddr
in interface EndPoint
getLocalAddr
in class StreamEndPoint
EndPoint
is bound, or null
if this EndPoint
does not represent a network connection.public java.lang.String getLocalHost()
getLocalHost
in interface EndPoint
getLocalHost
in class StreamEndPoint
EndPoint
is bound, or null
if this EndPoint
does not represent a network connection.public int getLocalPort()
getLocalPort
in interface EndPoint
getLocalPort
in class StreamEndPoint
EndPoint
is listening, or 0
if this EndPoint
does not represent a network connection.public java.lang.String getRemoteAddr()
getRemoteAddr
in interface EndPoint
getRemoteAddr
in class StreamEndPoint
EndPoint
is connected, or null
if this EndPoint
does not represent a network connection.public java.lang.String getRemoteHost()
getRemoteHost
in interface EndPoint
getRemoteHost
in class StreamEndPoint
EndPoint
is connected, or null
if this EndPoint
does not represent a network connection.public int getRemotePort()
getRemotePort
in interface EndPoint
getRemotePort
in class StreamEndPoint
EndPoint
is connected, or 0
if this EndPoint
does not represent a network connection.public java.lang.Object getTransport()
getTransport
in interface EndPoint
getTransport
in class StreamEndPoint
public void setMaxIdleTime(int timeMs) throws java.io.IOException
EndPoint
setMaxIdleTime
in interface EndPoint
setMaxIdleTime
in class StreamEndPoint
timeMs
- 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 StreamEndPoint
java.io.IOException
public java.lang.String toString()
toString
in class java.lang.Object
Copyright © 2014. All Rights Reserved.