Class RxtxChannel
- All Implemented Interfaces:
Channel, ChannelOutboundInvoker, AttributeMap, Comparable<Channel>
Deprecated.
this transport will be removed in the next major version.
A channel to a serial device using the RXTX library.
-
Nested Class Summary
Nested classes/interfaces inherited from class AbstractChannel
AbstractChannel.AbstractUnsafeModifier and TypeClassDescriptionprotected classChannel.Unsafeimplementation which sub-classes must extend and use.Nested classes/interfaces inherited from interface Channel
Channel.UnsafeModifier and TypeInterfaceDescriptionstatic interfaceUnsafe operations that should never be called from user-code. -
Field Summary
Fields inherited from class AbstractOioChannel
SO_TIMEOUT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionconfig()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 voiddoInit()Deprecated.protected booleanDeprecated.Determine if the input side of this channel is shutdown.booleanisOpen()Deprecated.Returnstrueif theChannelis open and may get active laterDeprecated.Returns the local address where this channel is bound to.protected RxtxDeviceAddressDeprecated.Returns theSocketAddresswhich is bound locally.protected AbstractChannel.AbstractUnsafeDeprecated.Create a newAbstractChannel.AbstractUnsafeinstance which will be used for the life-time of theChannelDeprecated.Returns the remote address where this channel is connected to.protected RxtxDeviceAddressDeprecated.Return theSocketAddresswhich theChannelis connected to.protected ChannelFutureDeprecated.Shutdown the input side of this channel.Methods inherited from class OioByteStreamChannel
activate, available, doReadBytes, doWriteBytes, doWriteFileRegion, isActiveModifier and TypeMethodDescriptionprotected final voidactivate(InputStream is, OutputStream os) Deprecated.Activate this instance.protected intDeprecated.Return the number of bytes ready to read from the underlying Socket.protected intdoReadBytes(ByteBuf buf) Deprecated.Read bytes from the underlying Socket.protected voiddoWriteBytes(ByteBuf buf) Deprecated.Write the data which is hold by theByteBufto the underlying Socket.protected voiddoWriteFileRegion(FileRegion region) Deprecated.Write the data which is hold by theFileRegionto the underlying Socket.booleanisActive()Deprecated.Returntrueif theChannelis active and so connected.Methods inherited from class AbstractOioByteChannel
doRead, doWrite, filterOutboundMessage, metadataModifier and TypeMethodDescriptionprotected voiddoRead()Deprecated.protected voidDeprecated.Flush the content of the given buffer to the remote peer.protected final ObjectDeprecated.Invoked when a new message is added to aChannelOutboundBufferof thisAbstractChannel, so that theChannelimplementation converts the message to another.metadata()Deprecated.Methods inherited from class AbstractOioChannel
clearReadPending, doBeginRead, isCompatible, isReadPending, setReadPendingModifier and TypeMethodDescriptionprotected final voidDeprecated.Set read pending tofalse.protected voidDeprecated.Schedule a read operation.protected booleanisCompatible(EventLoop loop) Deprecated.Returntrueif the givenEventLoopis compatible with this instance.protected booleanDeprecated.No longer supported.protected voidsetReadPending(boolean readPending) Deprecated.UseAbstractOioChannel.clearReadPending()if appropriate instead.Methods inherited from class AbstractChannel
closeFuture, compareTo, doDeregister, doRegister, doRegister, doShutdownOutput, equals, eventLoop, hashCode, id, invalidateLocalAddress, invalidateRemoteAddress, isRegistered, maxMessagesPerWrite, newChannelPipeline, newId, parent, pipeline, toString, unsafe, validateFileRegion, voidPromiseModifier and TypeMethodDescriptionReturns theChannelFuturewhich will be notified when this channel is closed.final intprotected voidprotected voidDeprecated.protected voiddoRegister(ChannelPromise promise) protected voidCalled when conditions justify shutting down the output portion of the channel.final booleanReturnstrueif and only if the specified object is identical with this channel (i.e:this == o).final inthashCode()Returns the ID of this channel.final ChannelIdid()Returns the globally unique identifier of thisChannel.protected voidDeprecated.no use-case for this.protected voidDeprecated.no use-case for this.booleanprotected final intprotected DefaultChannelPipelineReturns a newDefaultChannelPipelineinstance.protected ChannelIdnewId()Returns a newDefaultChannelIdinstance.parent()Returns the parent of this channel.pipeline()Return the assignedChannelPipeline.toString()Returns theStringrepresentation of this channel.unsafe()Returns an internal-use-only object that provides unsafe operations.protected voidvalidateFileRegion(DefaultFileRegion region, long position) final ChannelPromiseReturn a special ChannelPromise which can be reused for different operations.Methods inherited from class DefaultAttributeMap
attr, hasAttrModifier and TypeMethodDescription<T> Attribute<T> attr(AttributeKey<T> key) Get theAttributefor the givenAttributeKey.<T> booleanhasAttr(AttributeKey<T> key) Methods inherited from interface Channel
alloc, bind, bind, bytesBeforeUnwritable, bytesBeforeWritable, close, close, connect, connect, connect, connect, deregister, deregister, disconnect, disconnect, flush, getOption, isWritable, newFailedFuture, newProgressivePromise, newPromise, newSucceededFuture, read, setOption, write, write, writeAndFlush, writeAndFlushModifier and TypeMethodDescriptiondefault ByteBufAllocatoralloc()Return the assignedByteBufAllocatorwhich will be used to allocateByteBufs.default ChannelFuturebind(SocketAddress localAddress) Request to bind to the givenSocketAddressand notify theChannelFutureonce the operation completes, either because the operation was successful or because of an error.default ChannelFuturebind(SocketAddress localAddress, ChannelPromise promise) Request to bind to the givenSocketAddressand notify theChannelFutureonce the operation completes, either because the operation was successful or because of an error.default longGet how many bytes can be written untilChannel.isWritable()returnsfalse.default longGet how many bytes must be drained from underlying buffers untilChannel.isWritable()returnstrue.default ChannelFutureclose()Request to close theChanneland notify theChannelFutureonce the operation completes, either because the operation was successful or because of an error.default ChannelFutureclose(ChannelPromise promise) Request to close theChanneland notify theChannelFutureonce the operation completes, either because the operation was successful or because of an error.default ChannelFutureconnect(SocketAddress remoteAddress) Request to connect to the givenSocketAddressand notify theChannelFutureonce the operation completes, either because the operation was successful or because of an error.default ChannelFutureconnect(SocketAddress remoteAddress, ChannelPromise promise) Request to connect to the givenSocketAddressand notify theChannelFutureonce the operation completes, either because the operation was successful or because of an error.default ChannelFutureconnect(SocketAddress remoteAddress, SocketAddress localAddress) Request to connect to the givenSocketAddresswhile bind to the localAddress and notify theChannelFutureonce the operation completes, either because the operation was successful or because of an error.default ChannelFutureconnect(SocketAddress remoteAddress, SocketAddress localAddress, ChannelPromise promise) Request to connect to the givenSocketAddresswhile bind to the localAddress and notify theChannelFutureonce the operation completes, either because the operation was successful or because of an error.default ChannelFutureRequest to deregister from the previous assignedEventExecutorand notify theChannelFutureonce the operation completes, either because the operation was successful or because of an error.default ChannelFuturederegister(ChannelPromise promise) Request to deregister from the previous assignedEventExecutorand notify theChannelFutureonce the operation completes, either because the operation was successful or because of an error.default ChannelFutureRequest to disconnect from the remote peer and notify theChannelFutureonce the operation completes, either because the operation was successful or because of an error.default ChannelFuturedisconnect(ChannelPromise promise) Request to disconnect from the remote peer and notify theChannelFutureonce the operation completes, either because the operation was successful or because of an error.default Channelflush()Request to flush all pending messages via this ChannelOutboundInvoker.default <T> TgetOption(ChannelOption<T> option) Return the value of the givenChannelOptiondefault booleanReturnstrueif and only if the I/O thread will perform the requested write operation immediately.default ChannelFuturenewFailedFuture(Throwable cause) Create a newChannelFuturewhich is marked as failed already.default ChannelProgressivePromiseReturn an newChannelProgressivePromisedefault ChannelPromiseReturn a newChannelPromise.default ChannelFutureCreate a newChannelFuturewhich is marked as succeeded already.default Channelread()Request to Read data from theChannelinto the first inbound buffer, triggers anChannelInboundHandler.channelRead(ChannelHandlerContext, Object)event if data was read, and triggers achannelReadCompleteevent so the handler can decide to continue reading.default <T> booleansetOption(ChannelOption<T> option, T value) Sets a configuration property with the specified name and value.default ChannelFutureRequest to write a message via thisChannelHandlerContextthrough theChannelPipeline.default ChannelFuturewrite(Object msg, ChannelPromise promise) Request to write a message via thisChannelHandlerContextthrough theChannelPipeline.default ChannelFuturewriteAndFlush(Object msg) Shortcut for callChannelOutboundInvoker.write(Object)andChannelOutboundInvoker.flush().default ChannelFuturewriteAndFlush(Object msg, ChannelPromise promise) Shortcut for callChannelOutboundInvoker.write(Object, ChannelPromise)andChannelOutboundInvoker.flush().
-
Constructor Details
-
RxtxChannel
public RxtxChannel()Deprecated.
-
-
Method Details
-
config
-
isOpen
-
newUnsafe
Deprecated.Description copied from class:AbstractChannelCreate a newAbstractChannel.AbstractUnsafeinstance which will be used for the life-time of theChannel- Overrides:
newUnsafein classAbstractOioChannel
-
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
-
doInit
-
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- 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- 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
-
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
-
isInputShutdown
protected boolean isInputShutdown()Deprecated.Description copied from class:AbstractOioByteChannelDetermine if the input side of this channel is shutdown.- Specified by:
isInputShutdownin classAbstractOioByteChannel- Returns:
trueif the input side of this channel is shutdown.
-
shutdownInput
Deprecated.Description copied from class:AbstractOioByteChannelShutdown the input side of this channel.- Specified by:
shutdownInputin classAbstractOioByteChannel- Returns:
- A channel future that will complete when the shutdown is complete.
-