Class TunnelFilter
java.lang.Object
org.glassfish.grizzly.filterchain.BaseFilter
org.glassfish.grizzly.samples.tunnel.TunnelFilter
- All Implemented Interfaces:
org.glassfish.grizzly.filterchain.Filter
public class TunnelFilter
extends org.glassfish.grizzly.filterchain.BaseFilter
Simple tunneling filter, which maps input of one connection to the output of
another and vise versa.
- Author:
- Alexey Stashok
-
Constructor Summary
ConstructorsConstructorDescriptionTunnelFilter(org.glassfish.grizzly.SocketConnectorHandler transport, String host, int port) TunnelFilter(org.glassfish.grizzly.SocketConnectorHandler transport, SocketAddress redirectAddress) -
Method Summary
Modifier and TypeMethodDescriptionorg.glassfish.grizzly.filterchain.NextActionhandleClose(org.glassfish.grizzly.filterchain.FilterChainContext ctx) This method will be called, to notify aboutConnectionclosing.org.glassfish.grizzly.filterchain.NextActionhandleRead(org.glassfish.grizzly.filterchain.FilterChainContext ctx) This method will be called, onceConnectionhas some available dataMethods inherited from class org.glassfish.grizzly.filterchain.BaseFilter
createContext, exceptionOccurred, handleAccept, handleConnect, handleEvent, handleWrite, onAdded, onFilterChainChanged, onRemoved, toString
-
Constructor Details
-
TunnelFilter
-
TunnelFilter
public TunnelFilter(org.glassfish.grizzly.SocketConnectorHandler transport, SocketAddress redirectAddress)
-
-
Method Details
-
handleRead
public org.glassfish.grizzly.filterchain.NextAction handleRead(org.glassfish.grizzly.filterchain.FilterChainContext ctx) throws IOException This method will be called, onceConnectionhas some available data- Specified by:
handleReadin interfaceorg.glassfish.grizzly.filterchain.Filter- Overrides:
handleReadin classorg.glassfish.grizzly.filterchain.BaseFilter- Throws:
IOException
-
handleClose
public org.glassfish.grizzly.filterchain.NextAction handleClose(org.glassfish.grizzly.filterchain.FilterChainContext ctx) throws IOException This method will be called, to notify aboutConnectionclosing.- Specified by:
handleClosein interfaceorg.glassfish.grizzly.filterchain.Filter- Overrides:
handleClosein classorg.glassfish.grizzly.filterchain.BaseFilter- Throws:
IOException
-