uk.ac.rdg.resc.jstyx.messages
Class StyxMessageDecoder

java.lang.Object
  extended by uk.ac.rdg.resc.jstyx.messages.StyxMessageDecoder
All Implemented Interfaces:
org.apache.mina.protocol.ProtocolDecoder

public class StyxMessageDecoder
extends java.lang.Object
implements org.apache.mina.protocol.ProtocolDecoder

Decoder for StyxMessages, used by MINA framework

Author:
Jon Blower $Revision: 444 $ $Date: 2005-11-03 07:46:55 +0000 (Thu, 03 Nov 2005) $ $Log$ Revision 1.11 2005/11/03 07:46:55 jonblower Trying to fix bug with sending RreadMessages Revision 1.10 2005/06/27 17:19:22 jonblower Synchronized decode() method to try to eliminate concurrency problems Revision 1.8 2005/05/10 19:21:18 jonblower Minor change: replaced ternary ?: operator with Math.min Revision 1.7 2005/03/22 17:48:27 jonblower Removed debug code that tracked ByteBuffer allocation Revision 1.6 2005/03/22 10:20:05 jonblower Fixed problem with ByteBuffer leak in StyxMessageDecoder and StyxFileInputStream Revision 1.5 2005/03/21 17:57:11 jonblower Trying to fix ByteBuffer leak in SGS server Revision 1.4 2005/03/15 16:56:19 jonblower Changed to allow re-use of ByteBuffers once message is finished with Revision 1.3 2005/03/15 09:03:58 jonblower Now uses MINA's ByteBuffer to read header info, not StyxBuffer Revision 1.2 2005/03/11 14:02:16 jonblower Merged MINA-Test_20059309 into main line of development Revision 1.1.2.3 2005/03/10 18:28:44 jonblower Made decoder and encoder package-private Revision 1.1.2.2 2005/03/10 11:50:14 jonblower Removed reference to StyxBuffer (which is now in this package) Revision 1.1.2.1 2005/03/10 11:26:49 jonblower Moved from mina to messages package Revision 1.2.2.1 2005/03/09 19:44:15 jonblower Changes concerned with migration to MINA Revision 1.2 2005/03/09 16:58:42 jonblower Changes to MINA-related classes Revision 1.1 2005/03/09 08:52:25 jonblower Initial import of MINA-related classes

Constructor Summary
StyxMessageDecoder()
           
 
Method Summary
 void decode(org.apache.mina.protocol.ProtocolSession session, org.apache.mina.common.ByteBuffer in, org.apache.mina.protocol.ProtocolDecoderOutput out)
           
 void release()
          Releases the resources associated with this Decoder (specifically, releases the ByteBuffer that was allocated for reading message headers.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StyxMessageDecoder

public StyxMessageDecoder()
Method Detail

decode

public void decode(org.apache.mina.protocol.ProtocolSession session,
                   org.apache.mina.common.ByteBuffer in,
                   org.apache.mina.protocol.ProtocolDecoderOutput out)
            throws org.apache.mina.protocol.ProtocolViolationException
Specified by:
decode in interface org.apache.mina.protocol.ProtocolDecoder
Throws:
org.apache.mina.protocol.ProtocolViolationException

release

public void release()
Releases the resources associated with this Decoder (specifically, releases the ByteBuffer that was allocated for reading message headers. This method is called automatically when a StyxConnection is closed. After calling this method, the Decoder can no longer be used.



Copyright © 2004-2006 Reading e-Science Centre. All Rights Reserved.