Class AbstractServerChannel

    • Constructor Detail

      • AbstractServerChannel

        protected AbstractServerChannel​(ChannelFactory factory,
                                        ChannelPipeline pipeline,
                                        ChannelSink sink)
        Creates a new instance.
        Parameters:
        factory - the factory which created this channel
        pipeline - the pipeline which is going to be attached to this channel
        sink - the sink which will receive downstream events from the pipeline and send upstream events to the pipeline
    • Method Detail

      • connect

        public ChannelFuture connect​(java.net.SocketAddress remoteAddress)
        Description copied from interface: Channel
        Connects this channel to the specified remote address asynchronously.
        Specified by:
        connect in interface Channel
        Overrides:
        connect in class AbstractChannel
        Parameters:
        remoteAddress - where to connect
        Returns:
        the ChannelFuture which will be notified when the connection request succeeds or fails
      • setInterestOps

        public ChannelFuture setInterestOps​(int interestOps)
        Description copied from interface: Channel
        Changes the interestOps of this channel asynchronously.
        Specified by:
        setInterestOps in interface Channel
        Overrides:
        setInterestOps in class AbstractChannel
        Parameters:
        interestOps - the new interestOps
        Returns:
        the ChannelFuture which will be notified when the interestOps change request succeeds or fails
      • setInternalInterestOps

        protected void setInternalInterestOps​(int interestOps)
        Description copied from class: AbstractChannel
        Sets the interestOps property of this channel immediately. This method is intended to be called by an internal component - please do not call it unless you know what you are doing.
        Overrides:
        setInternalInterestOps in class AbstractChannel
      • write

        public ChannelFuture write​(java.lang.Object message)
        Description copied from interface: Channel
        Sends a message to this channel asynchronously. If this channel was created by a connectionless transport (e.g. DatagramChannel) and is not connected yet, you have to call Channel.write(Object, SocketAddress) instead. Otherwise, the write request will fail with NotYetConnectedException and an 'exceptionCaught' event will be triggered.
        Specified by:
        write in interface Channel
        Overrides:
        write in class AbstractChannel
        Parameters:
        message - the message to write
        Returns:
        the ChannelFuture which will be notified when the write request succeeds or fails
      • write

        public ChannelFuture write​(java.lang.Object message,
                                   java.net.SocketAddress remoteAddress)
        Description copied from interface: Channel
        Sends a message to this channel asynchronously. It has an additional parameter that allows a user to specify where to send the specified message instead of this channel's current remote address. If this channel was created by a connectionless transport (e.g. DatagramChannel) and is not connected yet, you must specify non-null address. Otherwise, the write request will fail with NotYetConnectedException and an 'exceptionCaught' event will be triggered.
        Specified by:
        write in interface Channel
        Overrides:
        write in class AbstractChannel
        Parameters:
        message - the message to write
        remoteAddress - where to send the specified message. This method is identical to Channel.write(Object) if null is specified here.
        Returns:
        the ChannelFuture which will be notified when the write request succeeds or fails
      • isConnected

        public boolean isConnected()
        Description copied from interface: Channel
        Returns true if and only if this channel is connected to a remote address.
        Specified by:
        isConnected in interface Channel