|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.net.Socket
org.jboss.remoting.transport.multiplex.VirtualSocket
Copyright (c) 2005
Field Summary | |
protected static org.jboss.logging.Logger |
log
|
Constructor Summary | |
VirtualSocket()
|
|
VirtualSocket(java.net.InetAddress address,
int port)
|
|
VirtualSocket(java.net.InetAddress host,
int port,
boolean stream)
|
|
VirtualSocket(java.net.InetAddress address,
int port,
java.net.InetAddress localAddr,
int localPort)
|
|
VirtualSocket(MultiplexingManager manager,
SocketId remoteSocketId)
|
|
VirtualSocket(java.net.SocketImpl impl)
|
|
VirtualSocket(java.lang.String host,
int port)
|
|
VirtualSocket(java.lang.String host,
int port,
boolean stream)
|
|
VirtualSocket(java.lang.String host,
int port,
java.net.InetAddress localAddr,
int localPort)
|
Method Summary | |
void |
bind(java.net.SocketAddress address)
Binds the socket to a local address. |
void |
close()
|
void |
connect(java.net.SocketAddress endpoint)
Connects this socket to the server. |
void |
connect(java.net.SocketAddress socketAddress,
int timeout)
Connects this socket to the server with a specified timeout value. |
protected java.net.Socket |
getActualSocket()
|
java.net.InetAddress |
getInetAddress()
|
java.io.InputStream |
getInputStream()
|
java.net.InetAddress |
getLocalAddress()
Note. |
int |
getLocalPort()
|
java.net.SocketAddress |
getLocalSocketAddress()
|
SocketId |
getLocalSocketId()
|
int |
getLocalVirtualPort()
|
protected MultiplexingManager |
getManager()
|
java.io.OutputStream |
getOutputStream()
|
int |
getPort()
|
protected Protocol |
getProtocol()
|
java.net.SocketAddress |
getRemoteSocketAddress()
|
SocketId |
getRemoteSocketId()
|
int |
getVirtualPort()
|
void |
handleRemoteDisconnect()
|
void |
handleRemoteInputShutDown()
FIXME Comment this |
void |
handleRemoteOutputShutDown()
FIXME Comment this |
boolean |
isBound()
|
boolean |
isClosed()
Returns the closed state of the socket. |
boolean |
isConnected()
Returns the connected state of the socket. |
boolean |
isInputShutdown()
Returns whether the read-half of the socket connection is closed. |
boolean |
isOutputShutdown()
Returns whether the write-half of the socket connection is closed. |
protected void |
setActualSocket(java.net.Socket actualSocket)
|
protected void |
setBound(boolean bound)
|
protected void |
setClosed(boolean closed)
|
protected void |
setConnected(boolean connected)
|
protected void |
setInputShutdown(boolean inputShutdown)
|
protected void |
setInputStream(MultiplexingInputStream inputStream)
|
protected void |
setLocalSocketId(SocketId localSocketId)
|
protected void |
setManager(MultiplexingManager manager)
|
protected void |
setOutputShutdown(boolean outputShutdown)
|
protected void |
setOutputStream(MultiplexingOutputStream outputStream)
|
protected void |
setProtocol(Protocol protocol)
|
protected void |
setRemoteSocketId(SocketId remoteSocketId)
|
void |
shutdownInput()
|
void |
shutdownOutput()
|
Methods inherited from class java.net.Socket |
getChannel, getKeepAlive, getOOBInline, getReceiveBufferSize, getReuseAddress, getSendBufferSize, getSoLinger, getSoTimeout, getTcpNoDelay, getTrafficClass, sendUrgentData, setKeepAlive, setOOBInline, setReceiveBufferSize, setReuseAddress, setSendBufferSize, setSocketImplFactory, setSoLinger, setSoTimeout, setTcpNoDelay, setTrafficClass, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected static final org.jboss.logging.Logger log
Constructor Detail |
public VirtualSocket(MultiplexingManager manager, SocketId remoteSocketId) throws java.io.IOException
public VirtualSocket()
public VirtualSocket(java.lang.String host, int port) throws java.net.UnknownHostException, java.io.IOException
public VirtualSocket(java.lang.String host, int port, boolean stream) throws java.io.IOException
host
- port
- stream
-
java.io.IOException
public VirtualSocket(java.net.InetAddress address, int port) throws java.io.IOException
address
- port
-
java.io.IOException
public VirtualSocket(java.net.InetAddress host, int port, boolean stream) throws java.io.IOException
host
- port
- stream
-
java.io.IOException
public VirtualSocket(java.net.SocketImpl impl) throws java.net.SocketException
impl
-
java.net.SocketException
public VirtualSocket(java.lang.String host, int port, java.net.InetAddress localAddr, int localPort) throws java.io.IOException
host
- port
- localAddr
- localPort
-
java.io.IOException
public VirtualSocket(java.net.InetAddress address, int port, java.net.InetAddress localAddr, int localPort) throws java.io.IOException
address
- port
- localAddr
- localPort
-
java.io.IOException
Method Detail |
public void bind(java.net.SocketAddress address) throws java.io.IOException
If the address is null
, then the system will pick up
an ephemeral port and a valid local address to bind the socket.
TODO: security
address
- the SocketAddress
to bind to
java.io.IOException
- if the bind operation fails, or if the socket is already bound.
java.lang.IllegalArgumentException
- if bindpoint is a
SocketAddress subclass not supported by this socketpublic void close() throws java.io.IOException
java.io.IOException
public void connect(java.net.SocketAddress endpoint) throws java.io.IOException
endpoint
- the SocketAddress
java.io.IOException
- if an error occurs during the connection
java.lang.IllegalArgumentException
- if endpoint is null or is a
SocketAddress subclass not supported by this socketpublic void connect(java.net.SocketAddress socketAddress, int timeout) throws java.io.IOException
socketAddress
- the SocketAddress
timeout
- the timeout value to be used in milliseconds.
java.io.IOException
- if an error occurs during the connection
java.net.SocketTimeoutException
- if timeout expires before connecting
java.lang.IllegalArgumentException
- if endpoint is null or is a
SocketAddress subclass not supported by this socketpublic java.net.InetAddress getInetAddress()
public java.io.InputStream getInputStream() throws java.io.IOException
java.io.IOException
public java.net.InetAddress getLocalAddress()
public int getLocalPort()
public java.net.SocketAddress getLocalSocketAddress()
public java.io.OutputStream getOutputStream() throws java.io.IOException
java.io.IOException
public int getPort()
public java.net.SocketAddress getRemoteSocketAddress()
public boolean isBound()
public boolean isClosed()
public boolean isConnected()
public boolean isInputShutdown()
public boolean isOutputShutdown()
public void shutdownInput() throws java.io.IOException
java.io.IOException
public void shutdownOutput() throws java.io.IOException
java.io.IOException
public int getVirtualPort()
public int getLocalVirtualPort()
public SocketId getLocalSocketId()
public SocketId getRemoteSocketId()
public void handleRemoteInputShutDown() throws java.io.IOException
java.io.IOException
public void handleRemoteOutputShutDown() throws java.io.IOException
java.io.IOException
public void handleRemoteDisconnect() throws java.io.IOException
java.io.IOException
protected java.net.Socket getActualSocket()
protected void setActualSocket(java.net.Socket actualSocket)
actualSocket
- The actualSocket to set.protected void setBound(boolean bound)
bound
- The bound to set.protected MultiplexingManager getManager()
protected void setManager(MultiplexingManager manager)
manager
- The manager to set.protected Protocol getProtocol()
protected void setProtocol(Protocol protocol)
protocol
- The protocol to set.protected void setClosed(boolean closed)
closed
- The closed to set.protected void setConnected(boolean connected)
connected
- The connected to set.protected void setInputShutdown(boolean inputShutdown)
inputShutdown
- The inputShutdown to set.protected void setInputStream(MultiplexingInputStream inputStream)
inputStream
- The inputStream to set.protected void setLocalSocketId(SocketId localSocketId)
localSocketId
- The localSocketId to set.protected void setOutputShutdown(boolean outputShutdown)
outputShutdown
- The outputShutdown to set.protected void setOutputStream(MultiplexingOutputStream outputStream)
outputStream
- The outputStream to set.protected void setRemoteSocketId(SocketId remoteSocketId)
remoteSocketId
- The remoteSocketId to set.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |