com.sun.enterprise.mgmt.transport.grizzly.grizzly2
Class MessageFilter

java.lang.Object
  extended by org.glassfish.grizzly.filterchain.BaseFilter
      extended by com.sun.enterprise.mgmt.transport.grizzly.grizzly2.MessageFilter
All Implemented Interfaces:
org.glassfish.grizzly.filterchain.Filter

public class MessageFilter
extends org.glassfish.grizzly.filterchain.BaseFilter

Filter, responsible for Buffer <-> Message transformation. Message protocol format is: Message Header is MessageImpl.HEADER_LENGTH and composed of following fields. magicNumber integer MessageImpl.MAGIC_NUMBER version integer MessageImpl.VERSION type integer Message.getType() for possible values messageLength integer MessageImpl.maxTotalMessageLength Message Body is composed of following fields. payload byte[messageLen] MessageHeader Message#parseHeader(com.sun.enterprise.mgmt.transport.Buffer, int) MessageBody Message#parseMessage(com.sun.enterprise.mgmt.transport.Buffer, int, int)

Author:
Bongjae Chang, Joe Fialli, Alexey Stashok

Constructor Summary
MessageFilter()
           
 
Method Summary
 org.glassfish.grizzly.filterchain.NextAction handleRead(org.glassfish.grizzly.filterchain.FilterChainContext ctx)
           
 org.glassfish.grizzly.filterchain.NextAction handleWrite(org.glassfish.grizzly.filterchain.FilterChainContext ctx)
           
 
Methods inherited from class org.glassfish.grizzly.filterchain.BaseFilter
createContext, exceptionOccurred, getFilterChain, getIndex, handleAccept, handleClose, handleConnect, handleEvent, onAdded, onFilterChainChanged, onRemoved
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MessageFilter

public MessageFilter()
Method Detail

handleRead

public org.glassfish.grizzly.filterchain.NextAction handleRead(org.glassfish.grizzly.filterchain.FilterChainContext ctx)
                                                        throws IOException
Specified by:
handleRead in interface org.glassfish.grizzly.filterchain.Filter
Overrides:
handleRead in class org.glassfish.grizzly.filterchain.BaseFilter
Throws:
IOException

handleWrite

public org.glassfish.grizzly.filterchain.NextAction handleWrite(org.glassfish.grizzly.filterchain.FilterChainContext ctx)
                                                         throws IOException
Specified by:
handleWrite in interface org.glassfish.grizzly.filterchain.Filter
Overrides:
handleWrite in class org.glassfish.grizzly.filterchain.BaseFilter
Throws:
IOException


Copyright © 2012. All Rights Reserved.