Class OioSocketChannel
- java.lang.Object
-
- org.jboss.netty.channel.AbstractChannel
-
- org.jboss.netty.channel.socket.oio.AbstractOioChannel
-
- org.jboss.netty.channel.socket.oio.OioSocketChannel
-
- All Implemented Interfaces:
java.lang.Comparable<Channel>
,Channel
,SocketChannel
- Direct Known Subclasses:
OioAcceptedSocketChannel
,OioClientSocketChannel
abstract class OioSocketChannel extends AbstractOioChannel implements SocketChannel
-
-
Field Summary
Fields Modifier and Type Field Description private SocketChannelConfig
config
(package private) java.net.Socket
socket
-
Fields inherited from class org.jboss.netty.channel.socket.oio.AbstractOioChannel
interestOpsLock, remoteAddress, worker, workerThread
-
Fields inherited from interface org.jboss.netty.channel.Channel
OP_NONE, OP_READ, OP_READ_WRITE, OP_WRITE
-
-
Constructor Summary
Constructors Constructor Description OioSocketChannel(Channel parent, ChannelFactory factory, ChannelPipeline pipeline, ChannelSink sink, java.net.Socket socket)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description (package private) void
closeSocket()
SocketChannelConfig
getConfig()
Returns the configuration of this channel.(package private) abstract java.io.PushbackInputStream
getInputStream()
(package private) java.net.InetSocketAddress
getLocalSocketAddress()
(package private) abstract java.io.OutputStream
getOutputStream()
(package private) java.net.InetSocketAddress
getRemoteSocketAddress()
(package private) boolean
isSocketBound()
(package private) boolean
isSocketClosed()
(package private) boolean
isSocketConnected()
-
Methods inherited from class org.jboss.netty.channel.socket.oio.AbstractOioChannel
getInternalInterestOps, getLocalAddress, getRemoteAddress, isBound, isConnected, setClosed, setInternalInterestOps, write
-
Methods inherited from class org.jboss.netty.channel.AbstractChannel
bind, close, compareTo, connect, disconnect, equals, getAttachment, getCloseFuture, getFactory, getId, getInterestOps, getParent, getPipeline, getSucceededFuture, getUnsupportedOperationFuture, getUserDefinedWritability, hashCode, isOpen, isReadable, isWritable, setAttachment, setInterestOps, setReadable, setUnwritable, setUserDefinedWritability, setWritable, toString, unbind, write
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.jboss.netty.channel.Channel
bind, close, connect, disconnect, getAttachment, getCloseFuture, getFactory, getId, getInterestOps, getParent, getPipeline, getUserDefinedWritability, isBound, isConnected, isOpen, isReadable, isWritable, setAttachment, setInterestOps, setReadable, setUserDefinedWritability, unbind, write, write
-
Methods inherited from interface org.jboss.netty.channel.socket.SocketChannel
getLocalAddress, getRemoteAddress
-
-
-
-
Field Detail
-
socket
final java.net.Socket socket
-
config
private final SocketChannelConfig config
-
-
Constructor Detail
-
OioSocketChannel
OioSocketChannel(Channel parent, ChannelFactory factory, ChannelPipeline pipeline, ChannelSink sink, java.net.Socket socket)
-
-
Method Detail
-
getConfig
public SocketChannelConfig getConfig()
Description copied from interface:Channel
Returns the configuration of this channel.- Specified by:
getConfig
in interfaceChannel
- Specified by:
getConfig
in interfaceSocketChannel
-
getInputStream
abstract java.io.PushbackInputStream getInputStream()
-
getOutputStream
abstract java.io.OutputStream getOutputStream()
-
isSocketBound
boolean isSocketBound()
- Specified by:
isSocketBound
in classAbstractOioChannel
-
isSocketConnected
boolean isSocketConnected()
- Specified by:
isSocketConnected
in classAbstractOioChannel
-
getLocalSocketAddress
java.net.InetSocketAddress getLocalSocketAddress() throws java.lang.Exception
- Specified by:
getLocalSocketAddress
in classAbstractOioChannel
- Throws:
java.lang.Exception
-
getRemoteSocketAddress
java.net.InetSocketAddress getRemoteSocketAddress() throws java.lang.Exception
- Specified by:
getRemoteSocketAddress
in classAbstractOioChannel
- Throws:
java.lang.Exception
-
closeSocket
void closeSocket() throws java.io.IOException
- Specified by:
closeSocket
in classAbstractOioChannel
- Throws:
java.io.IOException
-
isSocketClosed
boolean isSocketClosed()
- Specified by:
isSocketClosed
in classAbstractOioChannel
-
-