Class AddClientMessageFilter

java.lang.Object
org.glassfish.grizzly.filterchain.BaseFilter
org.glassfish.grizzly.samples.portunif.addservice.AddClientMessageFilter
All Implemented Interfaces:
org.glassfish.grizzly.filterchain.Filter

public class AddClientMessageFilter extends org.glassfish.grizzly.filterchain.BaseFilter
The ADD-service message parser/serializer, which is responsible for parsing AddResponseMessage and serializing AddRequestMessage.
Author:
Alexey Stashok
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.glassfish.grizzly.filterchain.NextAction
    handleRead(org.glassfish.grizzly.filterchain.FilterChainContext ctx)
    Handle just read operation, when some message has come and ready to be processed.
    org.glassfish.grizzly.filterchain.NextAction
    handleWrite(org.glassfish.grizzly.filterchain.FilterChainContext ctx)
    Method is called, when we write a data to the Connection.

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

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

    Methods inherited from class java.lang.Object

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

    • AddClientMessageFilter

      public AddClientMessageFilter()
  • Method Details

    • handleRead

      public org.glassfish.grizzly.filterchain.NextAction handleRead(org.glassfish.grizzly.filterchain.FilterChainContext ctx) throws IOException
      Handle just read operation, when some message has come and ready to be processed.
      Specified by:
      handleRead in interface org.glassfish.grizzly.filterchain.Filter
      Overrides:
      handleRead in class org.glassfish.grizzly.filterchain.BaseFilter
      Parameters:
      ctx - Context of FilterChainContext processing
      Returns:
      the next action
      Throws:
      IOException
    • handleWrite

      public org.glassfish.grizzly.filterchain.NextAction handleWrite(org.glassfish.grizzly.filterchain.FilterChainContext ctx) throws IOException
      Method is called, when we write a data to the Connection. We override this method to perform AddRequestMessage -> Buffer transformation.
      Specified by:
      handleWrite in interface org.glassfish.grizzly.filterchain.Filter
      Overrides:
      handleWrite in class org.glassfish.grizzly.filterchain.BaseFilter
      Parameters:
      ctx - Context of FilterChainContext processing
      Returns:
      the next action
      Throws:
      IOException