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 AbstractChannel
AbstractChannel.AbstractUnsafeNested classes/interfaces inherited from interface Channel
Channel.Unsafe -
Field Summary
Fields inherited from class 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.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.Deprecated.Shutdown the input side of this channel.shutdownInput(ChannelPromise promise) Deprecated.Will shutdown the input and notifyChannelPromise.Deprecated.shutdownOutput(ChannelPromise promise) Deprecated.Will shutdown the output and notifyChannelPromise.Methods inherited from class OioByteStreamChannel
activate, available, doWriteBytes, doWriteFileRegionMethods inherited from class AbstractOioByteChannel
doRead, doWrite, filterOutboundMessage, metadataMethods inherited from class AbstractOioChannel
clearReadPending, doBeginRead, isCompatible, isReadPending, newUnsafeMethods inherited from class AbstractChannel
closeFuture, compareTo, doDeregister, doRegister, doRegister, equals, eventLoop, hashCode, id, invalidateLocalAddress, invalidateRemoteAddress, isRegistered, maxMessagesPerWrite, newChannelPipeline, newId, pipeline, toString, unsafe, validateFileRegion, voidPromiseMethods inherited from class DefaultAttributeMap
attr, hasAttrMethods inherited from interface AttributeMap
attr, hasAttrMethods inherited from interface Channel
alloc, bind, bind, bytesBeforeUnwritable, bytesBeforeWritable, close, close, closeFuture, connect, connect, connect, connect, deregister, deregister, disconnect, disconnect, eventLoop, flush, getOption, id, isRegistered, isWritable, metadata, newFailedFuture, newProgressivePromise, newPromise, newSucceededFuture, pipeline, read, setOption, unsafe, voidPromise, write, write, writeAndFlush, writeAndFlushMethods inherited from interface Comparable
compareTo
-
Constructor Details
-
OioSocketChannel
-
OioSocketChannel
-
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
-
isActive
-
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:
-
shutdownInput
Deprecated.Description copied from interface:DuplexChannelWill shutdown the input and notifyChannelPromise.- Specified by:
shutdownInputin interfaceDuplexChannel- See Also:
-
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.
-
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
-