Package org.webpieces.asyncserver.impl
Class ProxyTCPChannel
- java.lang.Object
-
- org.webpieces.asyncserver.impl.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.StringgetChannelId()booleangetKeepAlive()java.net.InetSocketAddressgetLocalAddress()java.net.InetSocketAddressgetRemoteAddress()org.webpieces.nio.api.channels.ChannelSessiongetSession()booleanisBlocking()booleanisBound()booleanisClosed()booleanisConnected()java.lang.BooleanisServerSide()booleanisSslChannel()voidsetKeepAlive(boolean b)voidsetReuseAddress(boolean b)java.lang.StringtoString()java.util.concurrent.CompletableFuture<java.lang.Void>write(java.nio.ByteBuffer b)
-
-
-
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:
connectin interfaceorg.webpieces.nio.api.channels.Channel
-
write
public java.util.concurrent.CompletableFuture<java.lang.Void> write(java.nio.ByteBuffer b)
- Specified by:
writein interfaceorg.webpieces.nio.api.channels.Channel
-
close
public java.util.concurrent.CompletableFuture<java.lang.Void> close()
- Specified by:
closein interfaceorg.webpieces.nio.api.channels.Channel
-
setReuseAddress
public void setReuseAddress(boolean b)
- Specified by:
setReuseAddressin interfaceorg.webpieces.nio.api.channels.RegisterableChannel
-
getKeepAlive
public boolean getKeepAlive()
- Specified by:
getKeepAlivein interfaceorg.webpieces.nio.api.channels.TCPChannel
-
setKeepAlive
public void setKeepAlive(boolean b)
- Specified by:
setKeepAlivein interfaceorg.webpieces.nio.api.channels.TCPChannel
-
getRemoteAddress
public java.net.InetSocketAddress getRemoteAddress()
- Specified by:
getRemoteAddressin interfaceorg.webpieces.nio.api.channels.Channel
-
isConnected
public boolean isConnected()
- Specified by:
isConnectedin interfaceorg.webpieces.nio.api.channels.Channel
-
getChannelId
public java.lang.String getChannelId()
- Specified by:
getChannelIdin interfaceorg.webpieces.nio.api.channels.RegisterableChannel
-
bind
public java.util.concurrent.CompletableFuture<java.lang.Void> bind(java.net.SocketAddress addr)
- Specified by:
bindin interfaceorg.webpieces.nio.api.channels.RegisterableChannel
-
isBlocking
public boolean isBlocking()
- Specified by:
isBlockingin interfaceorg.webpieces.nio.api.channels.RegisterableChannel
-
isClosed
public boolean isClosed()
- Specified by:
isClosedin interfaceorg.webpieces.nio.api.channels.RegisterableChannel
-
isBound
public boolean isBound()
- Specified by:
isBoundin interfaceorg.webpieces.nio.api.channels.RegisterableChannel
-
getLocalAddress
public java.net.InetSocketAddress getLocalAddress()
- Specified by:
getLocalAddressin interfaceorg.webpieces.nio.api.channels.RegisterableChannel
-
getSession
public org.webpieces.nio.api.channels.ChannelSession getSession()
- Specified by:
getSessionin interfaceorg.webpieces.nio.api.channels.Channel
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
isSslChannel
public boolean isSslChannel()
- Specified by:
isSslChannelin interfaceorg.webpieces.nio.api.channels.Channel
-
isServerSide
public java.lang.Boolean isServerSide()
- Specified by:
isServerSidein interfaceorg.webpieces.nio.api.channels.Channel
-
-