Klasse Plc4xEmbeddedChannel

java.lang.Object
io.netty.util.DefaultAttributeMap
io.netty.channel.AbstractChannel
io.netty.channel.embedded.Plc4xEmbeddedChannel
Alle implementierten Schnittstellen:
EventLoopProvider, io.netty.channel.Channel, io.netty.channel.ChannelOutboundInvoker, io.netty.util.AttributeMap, Comparable<io.netty.channel.Channel>

public class Plc4xEmbeddedChannel extends io.netty.channel.AbstractChannel implements EventLoopProvider
Base class for Channel implementations that are used in an embedded fashion.
  • Verschachtelte Klassen - Übersicht

    Von Klasse geerbte verschachtelte Klassen/Schnittstellen io.netty.channel.AbstractChannel

    io.netty.channel.AbstractChannel.AbstractUnsafe

    Von Schnittstelle geerbte verschachtelte Klassen/Schnittstellen io.netty.channel.Channel

    io.netty.channel.Channel.Unsafe
  • Konstruktorübersicht

    Konstruktoren
    Konstruktor
    Beschreibung
    Create a new instance with an EmbeddedChannelId and an empty pipeline.
    Plc4xEmbeddedChannel(boolean register, boolean hasDisconnect, io.netty.channel.ChannelHandler... handlers)
    Create a new instance with the pipeline initialized with the specified handlers.
    Plc4xEmbeddedChannel(boolean hasDisconnect, io.netty.channel.ChannelHandler... handlers)
    Create a new instance with the pipeline initialized with the specified handlers.
    Plc4xEmbeddedChannel(io.netty.channel.ChannelHandler... handlers)
    Create a new instance with the pipeline initialized with the specified handlers.
    Plc4xEmbeddedChannel(io.netty.channel.ChannelId channelId)
    Create a new instance with the specified ID and an empty pipeline.
    Plc4xEmbeddedChannel(io.netty.channel.ChannelId channelId, boolean register, boolean hasDisconnect, io.netty.channel.ChannelHandler... handlers)
    Create a new instance with the channel ID set to the given ID and the pipeline initialized with the specified handlers.
    Plc4xEmbeddedChannel(io.netty.channel.ChannelId channelId, boolean hasDisconnect, io.netty.channel.ChannelConfig config, io.netty.channel.ChannelHandler... handlers)
    Create a new instance with the channel ID set to the given ID and the pipeline initialized with the specified handlers.
    Plc4xEmbeddedChannel(io.netty.channel.ChannelId channelId, boolean hasDisconnect, io.netty.channel.ChannelHandler... handlers)
    Create a new instance with the channel ID set to the given ID and the pipeline initialized with the specified handlers.
    Plc4xEmbeddedChannel(io.netty.channel.ChannelId channelId, io.netty.channel.ChannelHandler... handlers)
    Create a new instance with the channel ID set to the given ID and the pipeline initialized with the specified handlers.
    Plc4xEmbeddedChannel(io.netty.channel.Channel parent, io.netty.channel.ChannelId channelId, boolean register, boolean hasDisconnect, io.netty.channel.ChannelHandler... handlers)
    Create a new instance with the channel ID set to the given ID and the pipeline initialized with the specified handlers.
  • Methodenübersicht

    Modifizierer und Typ
    Methode
    Beschreibung
    void
    Check if there was any Throwable received and if so rethrow it.
    final io.netty.channel.ChannelFuture
     
    final io.netty.channel.ChannelFuture
    close(io.netty.channel.ChannelPromise promise)
     
    io.netty.channel.ChannelConfig
     
    final io.netty.channel.ChannelFuture
     
    final io.netty.channel.ChannelFuture
    disconnect(io.netty.channel.ChannelPromise promise)
     
    protected void
     
    protected void
    doBind(SocketAddress localAddress)
     
    protected void
     
    protected void
     
    protected void
     
    protected void
    doWrite(io.netty.channel.ChannelOutboundBuffer in)
     
    protected final void
    Ensure the Channel is open and if not throw an exception.
    boolean
    Mark this Channel as finished.
    boolean
    Mark this Channel as finished and release all pending message in the inbound and outbound buffer.
    Flushes the inbound of this Channel.
    Flushes the outbound of this Channel.
    io.netty.channel.EventLoop
     
    protected void
    Called for each inbound message.
    protected void
    Called for each outbound message.
    Returns the Queue which holds all the Objects that were received by this Channel.
    boolean
     
    protected boolean
    isCompatible(io.netty.channel.EventLoop loop)
     
    boolean
     
    boolean
     
    Veraltet.
    Veraltet.
    protected SocketAddress
     
    io.netty.channel.ChannelMetadata
     
    protected final io.netty.channel.DefaultChannelPipeline
     
    protected io.netty.channel.AbstractChannel.AbstractUnsafe
     
    Returns the Queue which holds all the Objects that were written by this Channel.
    <T> T
    Return received data from this Channel
    <T> T
    Read data from the outbound.
    void
    Register this Channel on its EventLoop.
    boolean
    Release all buffered inbound messages and return true if any were in the inbound buffer, false otherwise.
    boolean
    Release all buffered outbound messages and return true if any were in the outbound buffer, false otherwise.
    protected SocketAddress
     
    void
    Run all tasks (which also includes scheduled tasks) that are pending in the EventLoop for this Channel
    long
    Run all pending scheduled tasks in the EventLoop for this Channel and return the nanoseconds when the next scheduled task is ready to run.
    io.netty.channel.Channel.Unsafe
     
    boolean
    Write messages to the inbound of this Channel.
    io.netty.channel.ChannelFuture
    Writes one message to the inbound of this Channel and does not flush it.
    io.netty.channel.ChannelFuture
    writeOneInbound(Object msg, io.netty.channel.ChannelPromise promise)
    Writes one message to the inbound of this Channel and does not flush it.
    io.netty.channel.ChannelFuture
    Writes one message to the outbound of this Channel and does not flush it.
    io.netty.channel.ChannelFuture
    writeOneOutbound(Object msg, io.netty.channel.ChannelPromise promise)
    Writes one message to the outbound of this Channel and does not flush it.
    boolean
    Write messages to the outbound of this Channel.

    Von Klasse geerbte Methoden io.netty.channel.AbstractChannel

    alloc, bind, bind, bytesBeforeUnwritable, bytesBeforeWritable, closeFuture, compareTo, connect, connect, connect, connect, deregister, deregister, doDeregister, doShutdownOutput, equals, eventLoop, filterOutboundMessage, flush, hashCode, id, invalidateLocalAddress, invalidateRemoteAddress, isWritable, localAddress, maxMessagesPerWrite, newFailedFuture, newId, newProgressivePromise, newPromise, newSucceededFuture, parent, pipeline, read, remoteAddress, toString, validateFileRegion, voidPromise, write, write, writeAndFlush, writeAndFlush

    Von Klasse geerbte Methoden io.netty.util.DefaultAttributeMap

    attr, hasAttr

    Von Klasse geerbte Methoden java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Von Schnittstelle geerbte Methoden io.netty.util.AttributeMap

    attr, hasAttr
  • Konstruktordetails

    • Plc4xEmbeddedChannel

      public Plc4xEmbeddedChannel()
      Create a new instance with an EmbeddedChannelId and an empty pipeline.
    • Plc4xEmbeddedChannel

      public Plc4xEmbeddedChannel(io.netty.channel.ChannelId channelId)
      Create a new instance with the specified ID and an empty pipeline.
      Parameter:
      channelId - the ChannelId that will be used to identify this channel
    • Plc4xEmbeddedChannel

      public Plc4xEmbeddedChannel(io.netty.channel.ChannelHandler... handlers)
      Create a new instance with the pipeline initialized with the specified handlers.
      Parameter:
      handlers - the ChannelHandlers which will be add in the ChannelPipeline
    • Plc4xEmbeddedChannel

      public Plc4xEmbeddedChannel(boolean hasDisconnect, io.netty.channel.ChannelHandler... handlers)
      Create a new instance with the pipeline initialized with the specified handlers.
      Parameter:
      hasDisconnect - false if this Channel will delegate disconnect() to close(), false otherwise.
      handlers - the ChannelHandlers which will be add in the ChannelPipeline
    • Plc4xEmbeddedChannel

      public Plc4xEmbeddedChannel(boolean register, boolean hasDisconnect, io.netty.channel.ChannelHandler... handlers)
      Create a new instance with the pipeline initialized with the specified handlers.
      Parameter:
      register - true if this Channel is registered to the EventLoop in the constructor. If false the user will need to call register().
      hasDisconnect - false if this Channel will delegate disconnect() to close(), false otherwise.
      handlers - the ChannelHandlers which will be add in the ChannelPipeline
    • Plc4xEmbeddedChannel

      public Plc4xEmbeddedChannel(io.netty.channel.ChannelId channelId, io.netty.channel.ChannelHandler... handlers)
      Create a new instance with the channel ID set to the given ID and the pipeline initialized with the specified handlers.
      Parameter:
      channelId - the ChannelId that will be used to identify this channel
      handlers - the ChannelHandlers which will be add in the ChannelPipeline
    • Plc4xEmbeddedChannel

      public Plc4xEmbeddedChannel(io.netty.channel.ChannelId channelId, boolean hasDisconnect, io.netty.channel.ChannelHandler... handlers)
      Create a new instance with the channel ID set to the given ID and the pipeline initialized with the specified handlers.
      Parameter:
      channelId - the ChannelId that will be used to identify this channel
      hasDisconnect - false if this Channel will delegate disconnect() to close(), false otherwise.
      handlers - the ChannelHandlers which will be add in the ChannelPipeline
    • Plc4xEmbeddedChannel

      public Plc4xEmbeddedChannel(io.netty.channel.ChannelId channelId, boolean register, boolean hasDisconnect, io.netty.channel.ChannelHandler... handlers)
      Create a new instance with the channel ID set to the given ID and the pipeline initialized with the specified handlers.
      Parameter:
      channelId - the ChannelId that will be used to identify this channel
      register - true if this Channel is registered to the EventLoop in the constructor. If false the user will need to call register().
      hasDisconnect - false if this Channel will delegate disconnect() to close(), false otherwise.
      handlers - the ChannelHandlers which will be add in the ChannelPipeline
    • Plc4xEmbeddedChannel

      public Plc4xEmbeddedChannel(io.netty.channel.Channel parent, io.netty.channel.ChannelId channelId, boolean register, boolean hasDisconnect, io.netty.channel.ChannelHandler... handlers)
      Create a new instance with the channel ID set to the given ID and the pipeline initialized with the specified handlers.
      Parameter:
      parent - the parent Channel of this EmbeddedChannel.
      channelId - the ChannelId that will be used to identify this channel
      register - true if this Channel is registered to the EventLoop in the constructor. If false the user will need to call register().
      hasDisconnect - false if this Channel will delegate disconnect() to close(), false otherwise.
      handlers - the ChannelHandlers which will be add in the ChannelPipeline
    • Plc4xEmbeddedChannel

      public Plc4xEmbeddedChannel(io.netty.channel.ChannelId channelId, boolean hasDisconnect, io.netty.channel.ChannelConfig config, io.netty.channel.ChannelHandler... handlers)
      Create a new instance with the channel ID set to the given ID and the pipeline initialized with the specified handlers.
      Parameter:
      channelId - the ChannelId that will be used to identify this channel
      hasDisconnect - false if this Channel will delegate disconnect() to close(), false otherwise.
      config - the ChannelConfig which will be returned by config().
      handlers - the ChannelHandlers which will be add in the ChannelPipeline
  • Methodendetails

    • getEventLoop

      public io.netty.channel.EventLoop getEventLoop()
      Angegeben von:
      getEventLoop in Schnittstelle EventLoopProvider
    • isRegistered

      public boolean isRegistered()
      Angegeben von:
      isRegistered in Schnittstelle io.netty.channel.Channel
      Setzt außer Kraft:
      isRegistered in Klasse io.netty.channel.AbstractChannel
    • register

      public void register() throws Exception
      Register this Channel on its EventLoop.
      Löst aus:
      Exception
    • newChannelPipeline

      protected final io.netty.channel.DefaultChannelPipeline newChannelPipeline()
      Setzt außer Kraft:
      newChannelPipeline in Klasse io.netty.channel.AbstractChannel
    • metadata

      public io.netty.channel.ChannelMetadata metadata()
      Angegeben von:
      metadata in Schnittstelle io.netty.channel.Channel
    • config

      public io.netty.channel.ChannelConfig config()
      Angegeben von:
      config in Schnittstelle io.netty.channel.Channel
    • isOpen

      public boolean isOpen()
      Angegeben von:
      isOpen in Schnittstelle io.netty.channel.Channel
    • isActive

      public boolean isActive()
      Angegeben von:
      isActive in Schnittstelle io.netty.channel.Channel
    • inboundMessages

      public Queue<Object> inboundMessages()
      Returns the Queue which holds all the Objects that were received by this Channel.
    • lastInboundBuffer

      @Deprecated public Queue<Object> lastInboundBuffer()
      Veraltet.
    • outboundMessages

      public Queue<Object> outboundMessages()
      Returns the Queue which holds all the Objects that were written by this Channel.
    • lastOutboundBuffer

      @Deprecated public Queue<Object> lastOutboundBuffer()
      Veraltet.
    • readInbound

      public <T> T readInbound()
      Return received data from this Channel
    • readOutbound

      public <T> T readOutbound()
      Read data from the outbound. This may return null if nothing is readable.
    • writeInbound

      public boolean writeInbound(Object... msgs)
      Write messages to the inbound of this Channel.
      Parameter:
      msgs - the messages to be written
      Gibt zurück:
      true if the write operation did add something to the inbound buffer
    • writeOneInbound

      public io.netty.channel.ChannelFuture writeOneInbound(Object msg)
      Writes one message to the inbound of this Channel and does not flush it. This method is conceptually equivalent to AbstractChannel.write(Object).
      Siehe auch:
    • writeOneInbound

      public io.netty.channel.ChannelFuture writeOneInbound(Object msg, io.netty.channel.ChannelPromise promise)
      Writes one message to the inbound of this Channel and does not flush it. This method is conceptually equivalent to AbstractChannel.write(Object, ChannelPromise).
      Siehe auch:
    • flushInbound

      public Plc4xEmbeddedChannel flushInbound()
      Flushes the inbound of this Channel. This method is conceptually equivalent to AbstractChannel.flush().
      Siehe auch:
    • writeOutbound

      public boolean writeOutbound(Object... msgs)
      Write messages to the outbound of this Channel.
      Parameter:
      msgs - the messages to be written
      Gibt zurück:
      bufferReadable returns true if the write operation did add something to the outbound buffer
    • writeOneOutbound

      public io.netty.channel.ChannelFuture writeOneOutbound(Object msg)
      Writes one message to the outbound of this Channel and does not flush it. This method is conceptually equivalent to AbstractChannel.write(Object).
      Siehe auch:
    • writeOneOutbound

      public io.netty.channel.ChannelFuture writeOneOutbound(Object msg, io.netty.channel.ChannelPromise promise)
      Writes one message to the outbound of this Channel and does not flush it. This method is conceptually equivalent to AbstractChannel.write(Object, ChannelPromise).
      Siehe auch:
    • flushOutbound

      public Plc4xEmbeddedChannel flushOutbound()
      Flushes the outbound of this Channel. This method is conceptually equivalent to AbstractChannel.flush().
      Siehe auch:
    • finish

      public boolean finish()
      Mark this Channel as finished. Any further try to write data to it will fail.
      Gibt zurück:
      bufferReadable returns true if any of the used buffers has something left to read
    • finishAndReleaseAll

      public boolean finishAndReleaseAll()
      Mark this Channel as finished and release all pending message in the inbound and outbound buffer. Any further try to write data to it will fail.
      Gibt zurück:
      bufferReadable returns true if any of the used buffers has something left to read
    • releaseInbound

      public boolean releaseInbound()
      Release all buffered inbound messages and return true if any were in the inbound buffer, false otherwise.
    • releaseOutbound

      public boolean releaseOutbound()
      Release all buffered outbound messages and return true if any were in the outbound buffer, false otherwise.
    • close

      public final io.netty.channel.ChannelFuture close()
      Angegeben von:
      close in Schnittstelle io.netty.channel.ChannelOutboundInvoker
      Setzt außer Kraft:
      close in Klasse io.netty.channel.AbstractChannel
    • disconnect

      public final io.netty.channel.ChannelFuture disconnect()
      Angegeben von:
      disconnect in Schnittstelle io.netty.channel.ChannelOutboundInvoker
      Setzt außer Kraft:
      disconnect in Klasse io.netty.channel.AbstractChannel
    • close

      public final io.netty.channel.ChannelFuture close(io.netty.channel.ChannelPromise promise)
      Angegeben von:
      close in Schnittstelle io.netty.channel.ChannelOutboundInvoker
      Setzt außer Kraft:
      close in Klasse io.netty.channel.AbstractChannel
    • disconnect

      public final io.netty.channel.ChannelFuture disconnect(io.netty.channel.ChannelPromise promise)
      Angegeben von:
      disconnect in Schnittstelle io.netty.channel.ChannelOutboundInvoker
      Setzt außer Kraft:
      disconnect in Klasse io.netty.channel.AbstractChannel
    • runPendingTasks

      public void runPendingTasks()
      Run all tasks (which also includes scheduled tasks) that are pending in the EventLoop for this Channel
    • runScheduledPendingTasks

      public long runScheduledPendingTasks()
      Run all pending scheduled tasks in the EventLoop for this Channel and return the nanoseconds when the next scheduled task is ready to run. If no other task was scheduled it will return -1.
    • checkException

      public void checkException()
      Check if there was any Throwable received and if so rethrow it.
    • ensureOpen

      protected final void ensureOpen()
      Ensure the Channel is open and if not throw an exception.
    • isCompatible

      protected boolean isCompatible(io.netty.channel.EventLoop loop)
      Angegeben von:
      isCompatible in Klasse io.netty.channel.AbstractChannel
    • localAddress0

      protected SocketAddress localAddress0()
      Angegeben von:
      localAddress0 in Klasse io.netty.channel.AbstractChannel
    • remoteAddress0

      protected SocketAddress remoteAddress0()
      Angegeben von:
      remoteAddress0 in Klasse io.netty.channel.AbstractChannel
    • doRegister

      protected void doRegister() throws Exception
      Setzt außer Kraft:
      doRegister in Klasse io.netty.channel.AbstractChannel
      Löst aus:
      Exception
    • doBind

      protected void doBind(SocketAddress localAddress) throws Exception
      Angegeben von:
      doBind in Klasse io.netty.channel.AbstractChannel
      Löst aus:
      Exception
    • doDisconnect

      protected void doDisconnect() throws Exception
      Angegeben von:
      doDisconnect in Klasse io.netty.channel.AbstractChannel
      Löst aus:
      Exception
    • doClose

      protected void doClose() throws Exception
      Angegeben von:
      doClose in Klasse io.netty.channel.AbstractChannel
      Löst aus:
      Exception
    • doBeginRead

      protected void doBeginRead() throws Exception
      Angegeben von:
      doBeginRead in Klasse io.netty.channel.AbstractChannel
      Löst aus:
      Exception
    • newUnsafe

      protected io.netty.channel.AbstractChannel.AbstractUnsafe newUnsafe()
      Angegeben von:
      newUnsafe in Klasse io.netty.channel.AbstractChannel
    • unsafe

      public io.netty.channel.Channel.Unsafe unsafe()
      Angegeben von:
      unsafe in Schnittstelle io.netty.channel.Channel
      Setzt außer Kraft:
      unsafe in Klasse io.netty.channel.AbstractChannel
    • doWrite

      protected void doWrite(io.netty.channel.ChannelOutboundBuffer in) throws Exception
      Angegeben von:
      doWrite in Klasse io.netty.channel.AbstractChannel
      Löst aus:
      Exception
    • handleOutboundMessage

      protected void handleOutboundMessage(Object msg)
      Called for each outbound message.
      Siehe auch:
    • handleInboundMessage

      protected void handleInboundMessage(Object msg)
      Called for each inbound message.