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

    Constructors
    Constructor
    Description
    TunnelFilter(org.glassfish.grizzly.SocketConnectorHandler transport, String host, int port)
     
    TunnelFilter(org.glassfish.grizzly.SocketConnectorHandler transport, SocketAddress redirectAddress)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.glassfish.grizzly.filterchain.NextAction
    handleClose(org.glassfish.grizzly.filterchain.FilterChainContext ctx)
    This method will be called, to notify about Connection closing.
    org.glassfish.grizzly.filterchain.NextAction
    handleRead(org.glassfish.grizzly.filterchain.FilterChainContext ctx)
    This method will be called, once Connection has some available data

    Methods inherited from class org.glassfish.grizzly.filterchain.BaseFilter

    createContext, exceptionOccurred, handleAccept, handleConnect, handleEvent, handleWrite, onAdded, onFilterChainChanged, onRemoved, toString

    Methods inherited from class java.lang.Object

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

    • TunnelFilter

      public TunnelFilter(org.glassfish.grizzly.SocketConnectorHandler transport, String host, int port)
    • 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, once Connection has some available data
      Specified by:
      handleRead in interface org.glassfish.grizzly.filterchain.Filter
      Overrides:
      handleRead in class org.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 about Connection closing.
      Specified by:
      handleClose in interface org.glassfish.grizzly.filterchain.Filter
      Overrides:
      handleClose in class org.glassfish.grizzly.filterchain.BaseFilter
      Throws:
      IOException