Package io.netty.channel.socket.oio
Class OioSocketChannel
java.lang.Object
io.netty.util.DefaultAttributeMap
io.netty.channel.AbstractChannel
io.netty.channel.oio.AbstractOioChannel
io.netty.channel.oio.AbstractOioByteChannel
io.netty.channel.oio.OioByteStreamChannel
io.netty.channel.socket.oio.OioSocketChannel
- All Implemented Interfaces:
Channel
,ChannelOutboundInvoker
,DuplexChannel
,SocketChannel
,AttributeMap
,Comparable<Channel>
Deprecated.
use NIO / EPOLL / KQUEUE transport.
A
SocketChannel
which is using Old-Blocking-IO-
Nested Class Summary
Nested classes/interfaces inherited from class io.netty.channel.AbstractChannel
AbstractChannel.AbstractUnsafe
Nested classes/interfaces inherited from interface io.netty.channel.Channel
Channel.Unsafe
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final OioSocketChannelConfig
Deprecated.private static final InternalLogger
Deprecated.private final Socket
Deprecated.Fields inherited from class io.netty.channel.oio.AbstractOioChannel
SO_TIMEOUT
-
Constructor Summary
ConstructorsConstructorDescriptionDeprecated.Create a new instance with an newSocket
OioSocketChannel
(Channel parent, Socket socket) Deprecated.Create a new instance from the givenSocket
OioSocketChannel
(Socket socket) Deprecated.Create a new instance from the givenSocket
-
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
Deprecated.(package private) final void
Deprecated.config()
Deprecated.Returns the configuration of this channel.protected void
doBind
(SocketAddress localAddress) Deprecated.Bind theChannel
to theSocketAddress
protected void
doClose()
Deprecated.Close theChannel
protected void
doConnect
(SocketAddress remoteAddress, SocketAddress localAddress) Deprecated.Connect to the remote peer using the given localAddress if one is specified ornull
otherwise.protected void
Deprecated.Disconnect thisChannel
from its remote peerprotected int
doReadBytes
(ByteBuf buf) Deprecated.Read bytes from the underlying Socket.protected final void
Deprecated.Called when conditions justify shutting down the output portion of the channel.boolean
isActive()
Deprecated.Returntrue
if theChannel
is active and so connected.boolean
Deprecated.Determine if the input side of this channel is shutdown.boolean
isOpen()
Deprecated.Returnstrue
if theChannel
is open and may get active laterboolean
Deprecated.boolean
Deprecated.Determine if both the input and output of this channel have been shutdown.Deprecated.Returns the local address where this channel is bound to.protected SocketAddress
Deprecated.Returns theSocketAddress
which is bound locally.parent()
Deprecated.Returns the parent of this channel.Deprecated.Returns the remote address where this channel is connected to.protected SocketAddress
Deprecated.Return theSocketAddress
which theChannel
is connected to.protected void
setReadPending
(boolean readPending) Deprecated.shutdown()
Deprecated.Will shutdown the input and output sides of this channel.shutdown
(ChannelPromise promise) Deprecated.Will shutdown the input and output sides of this channel.private static void
shutdownDone
(ChannelFuture shutdownOutputFuture, ChannelFuture shutdownInputFuture, ChannelPromise promise) Deprecated.Deprecated.Shutdown the input side of this channel.shutdownInput
(ChannelPromise promise) Deprecated.Will shutdown the input and notifyChannelPromise
.private void
shutdownInput0
(ChannelPromise promise) Deprecated.Deprecated.shutdownOutput
(ChannelPromise promise) Deprecated.Will shutdown the output and notifyChannelPromise
.private void
Deprecated.private void
shutdownOutput0
(ChannelPromise promise) Deprecated.private void
shutdownOutputDone
(ChannelFuture shutdownOutputFuture, ChannelPromise promise) Deprecated.Methods inherited from class io.netty.channel.oio.OioByteStreamChannel
activate, available, doWriteBytes, doWriteFileRegion
Methods inherited from class io.netty.channel.oio.AbstractOioByteChannel
doRead, doWrite, filterOutboundMessage, metadata
Methods inherited from class io.netty.channel.oio.AbstractOioChannel
clearReadPending, doBeginRead, isCompatible, isReadPending, newUnsafe
Methods inherited from class io.netty.channel.AbstractChannel
alloc, bind, bind, bytesBeforeUnwritable, bytesBeforeWritable, close, close, closeFuture, compareTo, connect, connect, connect, connect, deregister, deregister, disconnect, disconnect, doDeregister, doRegister, equals, eventLoop, flush, hashCode, id, invalidateLocalAddress, invalidateRemoteAddress, isRegistered, isWritable, maxMessagesPerWrite, newChannelPipeline, newFailedFuture, newId, newProgressivePromise, newPromise, newSucceededFuture, pipeline, read, toString, unsafe, validateFileRegion, voidPromise, write, write, writeAndFlush, writeAndFlush
Methods inherited from class io.netty.util.DefaultAttributeMap
attr, hasAttr
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface io.netty.util.AttributeMap
attr, hasAttr
Methods inherited from interface io.netty.channel.Channel
alloc, bytesBeforeUnwritable, bytesBeforeWritable, closeFuture, eventLoop, flush, id, isRegistered, isWritable, metadata, pipeline, read, unsafe
Methods inherited from interface io.netty.channel.ChannelOutboundInvoker
bind, bind, close, close, connect, connect, connect, connect, deregister, deregister, disconnect, disconnect, newFailedFuture, newProgressivePromise, newPromise, newSucceededFuture, voidPromise, write, write, writeAndFlush, writeAndFlush
Methods inherited from interface java.lang.Comparable
compareTo
-
Field Details
-
logger
Deprecated. -
socket
Deprecated. -
config
Deprecated.
-
-
Constructor Details
-
OioSocketChannel
public OioSocketChannel()Deprecated.Create a new instance with an newSocket
-
OioSocketChannel
Deprecated.Create a new instance from the givenSocket
- Parameters:
socket
- theSocket
which is used by this instance
-
OioSocketChannel
Deprecated.Create a new instance from the givenSocket
-
-
Method Details
-
parent
Deprecated.Description copied from interface:Channel
Returns the parent of this channel.- Specified by:
parent
in interfaceChannel
- Specified by:
parent
in interfaceSocketChannel
- Overrides:
parent
in classAbstractChannel
- Returns:
- the parent channel.
null
if this channel does not have a parent channel.
-
config
Deprecated.Description copied from interface:Channel
Returns the configuration of this channel.- Specified by:
config
in interfaceChannel
- Specified by:
config
in interfaceSocketChannel
-
isOpen
public boolean isOpen()Deprecated.Description copied from interface:Channel
Returnstrue
if theChannel
is open and may get active later -
isActive
public boolean isActive()Deprecated.Description copied from interface:Channel
Returntrue
if theChannel
is active and so connected.- Specified by:
isActive
in interfaceChannel
- Overrides:
isActive
in classOioByteStreamChannel
-
isOutputShutdown
public boolean isOutputShutdown()Deprecated.- Specified by:
isOutputShutdown
in interfaceDuplexChannel
- See Also:
-
isInputShutdown
public boolean isInputShutdown()Deprecated.Description copied from class:AbstractOioByteChannel
Determine if the input side of this channel is shutdown.- Specified by:
isInputShutdown
in interfaceDuplexChannel
- Specified by:
isInputShutdown
in classAbstractOioByteChannel
- Returns:
true
if the input side of this channel is shutdown.
-
isShutdown
public boolean isShutdown()Deprecated.Description copied from interface:DuplexChannel
Determine if both the input and output of this channel have been shutdown.- Specified by:
isShutdown
in interfaceDuplexChannel
-
doShutdownOutput
Deprecated.Description copied from class:AbstractChannel
Called when conditions justify shutting down the output portion of the channel. This may happen if a write operation throws an exception.- Overrides:
doShutdownOutput
in classAbstractChannel
- Throws:
Exception
-
shutdownOutput
Deprecated.- Specified by:
shutdownOutput
in interfaceDuplexChannel
- See Also:
-
shutdownInput
Deprecated.Description copied from class:AbstractOioByteChannel
Shutdown the input side of this channel.- Specified by:
shutdownInput
in interfaceDuplexChannel
- Specified by:
shutdownInput
in classAbstractOioByteChannel
- Returns:
- A channel future that will complete when the shutdown is complete.
- See Also:
-
shutdown
Deprecated.Description copied from interface:DuplexChannel
Will shutdown the input and output sides of this channel.- Specified by:
shutdown
in interfaceDuplexChannel
- Returns:
- will be completed when both shutdown operations complete.
-
doReadBytes
Deprecated.Description copied from class:AbstractOioByteChannel
Read bytes from the underlying Socket.- Overrides:
doReadBytes
in classOioByteStreamChannel
- Parameters:
buf
- theByteBuf
into which the read bytes will be written- Returns:
- amount the number of bytes read. This may return a negative amount if the underlying Socket was closed
- Throws:
Exception
- is thrown if an error occurred
-
shutdownOutput
Deprecated.Description copied from interface:DuplexChannel
Will shutdown the output and notifyChannelPromise
.- Specified by:
shutdownOutput
in interfaceDuplexChannel
- See Also:
-
shutdownOutput0
Deprecated. -
shutdownOutput0
Deprecated.- Throws:
IOException
-
shutdownInput
Deprecated.Description copied from interface:DuplexChannel
Will shutdown the input and notifyChannelPromise
.- Specified by:
shutdownInput
in interfaceDuplexChannel
- See Also:
-
shutdownInput0
Deprecated. -
shutdown
Deprecated.Description copied from interface:DuplexChannel
Will shutdown the input and output sides of this channel.- Specified by:
shutdown
in interfaceDuplexChannel
- Parameters:
promise
- will be completed when both shutdown operations complete.- Returns:
- will be completed when both shutdown operations complete.
-
shutdownOutputDone
Deprecated. -
shutdownDone
private static void shutdownDone(ChannelFuture shutdownOutputFuture, ChannelFuture shutdownInputFuture, ChannelPromise promise) Deprecated. -
localAddress
Deprecated.Description copied from interface:Channel
Returns the local address where this channel is bound to. The returnedSocketAddress
is supposed to be down-cast into more concrete type such asInetSocketAddress
to retrieve the detailed information.- Specified by:
localAddress
in interfaceChannel
- Specified by:
localAddress
in interfaceSocketChannel
- Overrides:
localAddress
in classAbstractChannel
- Returns:
- the local address of this channel.
null
if this channel is not bound.
-
remoteAddress
Deprecated.Description copied from interface:Channel
Returns the remote address where this channel is connected to. The returnedSocketAddress
is supposed to be down-cast into more concrete type such asInetSocketAddress
to retrieve the detailed information.- Specified by:
remoteAddress
in interfaceChannel
- Specified by:
remoteAddress
in interfaceSocketChannel
- Overrides:
remoteAddress
in classAbstractChannel
- Returns:
- the remote address of this channel.
null
if this channel is not connected. If this channel is not connected but it can receive messages from arbitrary remote addresses (e.g.DatagramChannel
, useDefaultAddressedEnvelope.recipient()
to determine the origination of the received message as this method will returnnull
.
-
localAddress0
Deprecated.Description copied from class:AbstractChannel
Returns theSocketAddress
which is bound locally.- Specified by:
localAddress0
in classAbstractChannel
-
remoteAddress0
Deprecated.Description copied from class:AbstractChannel
Return theSocketAddress
which theChannel
is connected to.- Specified by:
remoteAddress0
in classAbstractChannel
-
doBind
Deprecated.Description copied from class:AbstractChannel
Bind theChannel
to theSocketAddress
- Specified by:
doBind
in classAbstractChannel
- Throws:
Exception
-
doConnect
Deprecated.Description copied from class:AbstractOioChannel
Connect to the remote peer using the given localAddress if one is specified ornull
otherwise.- Specified by:
doConnect
in classAbstractOioChannel
- Throws:
Exception
-
doDisconnect
Deprecated.Description copied from class:AbstractChannel
Disconnect thisChannel
from its remote peer- Specified by:
doDisconnect
in classAbstractChannel
- Throws:
Exception
-
doClose
Deprecated.Description copied from class:AbstractChannel
Close theChannel
- Overrides:
doClose
in classOioByteStreamChannel
- Throws:
Exception
-
checkInputShutdown
protected boolean checkInputShutdown()Deprecated. -
setReadPending
Deprecated.- Overrides:
setReadPending
in classAbstractOioChannel
-
clearReadPending0
final void clearReadPending0()Deprecated.
-