Class ProxyTCPChannel

  • All Implemented Interfaces:
    org.webpieces.nio.api.channels.Channel, org.webpieces.nio.api.channels.RegisterableChannel, org.webpieces.nio.api.channels.TCPChannel

    public class ProxyTCPChannel
    extends java.lang.Object
    implements org.webpieces.nio.api.channels.TCPChannel
    • Constructor Summary

      Constructors 
      Constructor Description
      ProxyTCPChannel​(org.webpieces.nio.api.channels.TCPChannel channel, ConnectedChannels connectedChannels)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.concurrent.CompletableFuture<java.lang.Void> bind​(java.net.SocketAddress addr)  
      java.util.concurrent.CompletableFuture<java.lang.Void> close()  
      java.util.concurrent.CompletableFuture<java.lang.Void> connect​(java.net.SocketAddress addr, org.webpieces.nio.api.handlers.DataListener listener)  
      java.lang.String getChannelId()  
      boolean getKeepAlive()  
      java.net.InetSocketAddress getLocalAddress()  
      java.net.InetSocketAddress getRemoteAddress()  
      org.webpieces.nio.api.channels.ChannelSession getSession()  
      boolean isBlocking()  
      boolean isBound()  
      boolean isClosed()  
      boolean isConnected()  
      java.lang.Boolean isServerSide()  
      boolean isSslChannel()  
      void setKeepAlive​(boolean b)  
      void setReuseAddress​(boolean b)  
      java.lang.String toString()  
      java.util.concurrent.CompletableFuture<java.lang.Void> write​(java.nio.ByteBuffer b)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • ProxyTCPChannel

        public ProxyTCPChannel​(org.webpieces.nio.api.channels.TCPChannel channel,
                               ConnectedChannels connectedChannels)
    • Method Detail

      • connect

        public java.util.concurrent.CompletableFuture<java.lang.Void> connect​(java.net.SocketAddress addr,
                                                                              org.webpieces.nio.api.handlers.DataListener listener)
        Specified by:
        connect in interface org.webpieces.nio.api.channels.Channel
      • write

        public java.util.concurrent.CompletableFuture<java.lang.Void> write​(java.nio.ByteBuffer b)
        Specified by:
        write in interface org.webpieces.nio.api.channels.Channel
      • close

        public java.util.concurrent.CompletableFuture<java.lang.Void> close()
        Specified by:
        close in interface org.webpieces.nio.api.channels.Channel
      • setReuseAddress

        public void setReuseAddress​(boolean b)
        Specified by:
        setReuseAddress in interface org.webpieces.nio.api.channels.RegisterableChannel
      • getKeepAlive

        public boolean getKeepAlive()
        Specified by:
        getKeepAlive in interface org.webpieces.nio.api.channels.TCPChannel
      • setKeepAlive

        public void setKeepAlive​(boolean b)
        Specified by:
        setKeepAlive in interface org.webpieces.nio.api.channels.TCPChannel
      • getRemoteAddress

        public java.net.InetSocketAddress getRemoteAddress()
        Specified by:
        getRemoteAddress in interface org.webpieces.nio.api.channels.Channel
      • isConnected

        public boolean isConnected()
        Specified by:
        isConnected in interface org.webpieces.nio.api.channels.Channel
      • getChannelId

        public java.lang.String getChannelId()
        Specified by:
        getChannelId in interface org.webpieces.nio.api.channels.RegisterableChannel
      • bind

        public java.util.concurrent.CompletableFuture<java.lang.Void> bind​(java.net.SocketAddress addr)
        Specified by:
        bind in interface org.webpieces.nio.api.channels.RegisterableChannel
      • isBlocking

        public boolean isBlocking()
        Specified by:
        isBlocking in interface org.webpieces.nio.api.channels.RegisterableChannel
      • isClosed

        public boolean isClosed()
        Specified by:
        isClosed in interface org.webpieces.nio.api.channels.RegisterableChannel
      • isBound

        public boolean isBound()
        Specified by:
        isBound in interface org.webpieces.nio.api.channels.RegisterableChannel
      • getLocalAddress

        public java.net.InetSocketAddress getLocalAddress()
        Specified by:
        getLocalAddress in interface org.webpieces.nio.api.channels.RegisterableChannel
      • getSession

        public org.webpieces.nio.api.channels.ChannelSession getSession()
        Specified by:
        getSession in interface org.webpieces.nio.api.channels.Channel
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • isSslChannel

        public boolean isSslChannel()
        Specified by:
        isSslChannel in interface org.webpieces.nio.api.channels.Channel
      • isServerSide

        public java.lang.Boolean isServerSide()
        Specified by:
        isServerSide in interface org.webpieces.nio.api.channels.Channel