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.AbstractUnsafeNested classes/interfaces inherited from interface io.netty.channel.Channel
Channel.Unsafe -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final OioSocketChannelConfigDeprecated.private static final InternalLoggerDeprecated.private final SocketDeprecated.Fields inherited from class io.netty.channel.oio.AbstractOioChannel
SO_TIMEOUT -
Constructor Summary
ConstructorsConstructorDescriptionDeprecated.Create a new instance with an newSocketOioSocketChannel(Channel parent, Socket socket) Deprecated.Create a new instance from the givenSocketOioSocketChannel(Socket socket) Deprecated.Create a new instance from the givenSocket -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanDeprecated.(package private) final voidDeprecated.config()Deprecated.Returns the configuration of this channel.protected voiddoBind(SocketAddress localAddress) Deprecated.Bind theChannelto theSocketAddressprotected voiddoClose()Deprecated.Close theChannelprotected voiddoConnect(SocketAddress remoteAddress, SocketAddress localAddress) Deprecated.Connect to the remote peer using the given localAddress if one is specified ornullotherwise.protected voidDeprecated.Disconnect thisChannelfrom its remote peerprotected intdoReadBytes(ByteBuf buf) Deprecated.Read bytes from the underlying Socket.protected final voidDeprecated.Called when conditions justify shutting down the output portion of the channel.booleanisActive()Deprecated.Returntrueif theChannelis active and so connected.booleanDeprecated.Determine if the input side of this channel is shutdown.booleanisOpen()Deprecated.Returnstrueif theChannelis open and may get active laterbooleanDeprecated.booleanDeprecated.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 SocketAddressDeprecated.Returns theSocketAddresswhich is bound locally.parent()Deprecated.Returns the parent of this channel.Deprecated.Returns the remote address where this channel is connected to.protected SocketAddressDeprecated.Return theSocketAddresswhich theChannelis connected to.protected voidsetReadPending(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 voidshutdownDone(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 voidshutdownInput0(ChannelPromise promise) Deprecated.Deprecated.shutdownOutput(ChannelPromise promise) Deprecated.Will shutdown the output and notifyChannelPromise.private voidDeprecated.private voidshutdownOutput0(ChannelPromise promise) Deprecated.private voidshutdownOutputDone(ChannelFuture shutdownOutputFuture, ChannelPromise promise) Deprecated.Methods inherited from class io.netty.channel.oio.OioByteStreamChannel
activate, available, doWriteBytes, doWriteFileRegionMethods inherited from class io.netty.channel.oio.AbstractOioByteChannel
doRead, doWrite, filterOutboundMessage, metadataMethods inherited from class io.netty.channel.oio.AbstractOioChannel
clearReadPending, doBeginRead, isCompatible, isReadPending, newUnsafeMethods 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, writeAndFlushMethods inherited from class io.netty.util.DefaultAttributeMap
attr, hasAttrMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface io.netty.util.AttributeMap
attr, hasAttrMethods inherited from interface io.netty.channel.Channel
alloc, bytesBeforeUnwritable, bytesBeforeWritable, closeFuture, eventLoop, flush, id, isRegistered, isWritable, metadata, pipeline, read, unsafeMethods 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, writeAndFlushMethods 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- theSocketwhich is used by this instance
-
OioSocketChannel
Deprecated.Create a new instance from the givenSocket
-
-
Method Details
-
parent
Deprecated.Description copied from interface:ChannelReturns the parent of this channel.- Specified by:
parentin interfaceChannel- Specified by:
parentin interfaceSocketChannel- Overrides:
parentin classAbstractChannel- Returns:
- the parent channel.
nullif this channel does not have a parent channel.
-
config
Deprecated.Description copied from interface:ChannelReturns the configuration of this channel.- Specified by:
configin interfaceChannel- Specified by:
configin interfaceSocketChannel
-
isOpen
public boolean isOpen()Deprecated.Description copied from interface:ChannelReturnstrueif theChannelis open and may get active later -
isActive
public boolean isActive()Deprecated.Description copied from interface:ChannelReturntrueif theChannelis active and so connected.- Specified by:
isActivein interfaceChannel- Overrides:
isActivein classOioByteStreamChannel
-
isOutputShutdown
public boolean isOutputShutdown()Deprecated.- Specified by:
isOutputShutdownin interfaceDuplexChannel- See Also:
-
isInputShutdown
public boolean isInputShutdown()Deprecated.Description copied from class:AbstractOioByteChannelDetermine if the input side of this channel is shutdown.- Specified by:
isInputShutdownin interfaceDuplexChannel- Specified by:
isInputShutdownin classAbstractOioByteChannel- Returns:
trueif the input side of this channel is shutdown.
-
isShutdown
public boolean isShutdown()Deprecated.Description copied from interface:DuplexChannelDetermine if both the input and output of this channel have been shutdown.- Specified by:
isShutdownin interfaceDuplexChannel
-
doShutdownOutput
Deprecated.Description copied from class:AbstractChannelCalled when conditions justify shutting down the output portion of the channel. This may happen if a write operation throws an exception.- Overrides:
doShutdownOutputin classAbstractChannel- Throws:
Exception
-
shutdownOutput
Deprecated.- Specified by:
shutdownOutputin interfaceDuplexChannel- See Also:
-
shutdownInput
Deprecated.Description copied from class:AbstractOioByteChannelShutdown the input side of this channel.- Specified by:
shutdownInputin interfaceDuplexChannel- Specified by:
shutdownInputin classAbstractOioByteChannel- Returns:
- A channel future that will complete when the shutdown is complete.
- See Also:
-
shutdown
Deprecated.Description copied from interface:DuplexChannelWill shutdown the input and output sides of this channel.- Specified by:
shutdownin interfaceDuplexChannel- Returns:
- will be completed when both shutdown operations complete.
-
doReadBytes
Deprecated.Description copied from class:AbstractOioByteChannelRead bytes from the underlying Socket.- Overrides:
doReadBytesin classOioByteStreamChannel- Parameters:
buf- theByteBufinto 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:DuplexChannelWill shutdown the output and notifyChannelPromise.- Specified by:
shutdownOutputin interfaceDuplexChannel- See Also:
-
shutdownOutput0
Deprecated. -
shutdownOutput0
Deprecated.- Throws:
IOException
-
shutdownInput
Deprecated.Description copied from interface:DuplexChannelWill shutdown the input and notifyChannelPromise.- Specified by:
shutdownInputin interfaceDuplexChannel- See Also:
-
shutdownInput0
Deprecated. -
shutdown
Deprecated.Description copied from interface:DuplexChannelWill shutdown the input and output sides of this channel.- Specified by:
shutdownin 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:ChannelReturns the local address where this channel is bound to. The returnedSocketAddressis supposed to be down-cast into more concrete type such asInetSocketAddressto retrieve the detailed information.- Specified by:
localAddressin interfaceChannel- Specified by:
localAddressin interfaceSocketChannel- Overrides:
localAddressin classAbstractChannel- Returns:
- the local address of this channel.
nullif this channel is not bound.
-
remoteAddress
Deprecated.Description copied from interface:ChannelReturns the remote address where this channel is connected to. The returnedSocketAddressis supposed to be down-cast into more concrete type such asInetSocketAddressto retrieve the detailed information.- Specified by:
remoteAddressin interfaceChannel- Specified by:
remoteAddressin interfaceSocketChannel- Overrides:
remoteAddressin classAbstractChannel- Returns:
- the remote address of this channel.
nullif 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:AbstractChannelReturns theSocketAddresswhich is bound locally.- Specified by:
localAddress0in classAbstractChannel
-
remoteAddress0
Deprecated.Description copied from class:AbstractChannelReturn theSocketAddresswhich theChannelis connected to.- Specified by:
remoteAddress0in classAbstractChannel
-
doBind
Deprecated.Description copied from class:AbstractChannelBind theChannelto theSocketAddress- Specified by:
doBindin classAbstractChannel- Throws:
Exception
-
doConnect
Deprecated.Description copied from class:AbstractOioChannelConnect to the remote peer using the given localAddress if one is specified ornullotherwise.- Specified by:
doConnectin classAbstractOioChannel- Throws:
Exception
-
doDisconnect
Deprecated.Description copied from class:AbstractChannelDisconnect thisChannelfrom its remote peer- Specified by:
doDisconnectin classAbstractChannel- Throws:
Exception
-
doClose
Deprecated.Description copied from class:AbstractChannelClose theChannel- Overrides:
doClosein classOioByteStreamChannel- Throws:
Exception
-
checkInputShutdown
protected boolean checkInputShutdown()Deprecated. -
setReadPending
Deprecated.- Overrides:
setReadPendingin classAbstractOioChannel
-
clearReadPending0
final void clearReadPending0()Deprecated.
-