org.apache.activemq.apollo.transport
Class ObjectStreamProtocolCodecFactory

java.lang.Object
  extended by org.apache.activemq.apollo.transport.ObjectStreamProtocolCodecFactory
All Implemented Interfaces:
ProtocolCodecFactory.Provider

public class ObjectStreamProtocolCodecFactory
extends java.lang.Object
implements ProtocolCodecFactory.Provider


Constructor Summary
ObjectStreamProtocolCodecFactory()
           
 
Method Summary
 ProtocolCodec createProtocolCodec()
           
 boolean isIdentifiable()
           
 boolean matchesIdentification(org.fusesource.hawtbuf.Buffer byteSequence)
          Called to test if this protocol matches the identification header.
 int maxIdentificaionLength()
           
 java.lang.String protocol()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ObjectStreamProtocolCodecFactory

public ObjectStreamProtocolCodecFactory()
Method Detail

protocol

public java.lang.String protocol()
Specified by:
protocol in interface ProtocolCodecFactory.Provider

createProtocolCodec

public ProtocolCodec createProtocolCodec()
Specified by:
createProtocolCodec in interface ProtocolCodecFactory.Provider
Returns:
an instance of the wire format.

isIdentifiable

public boolean isIdentifiable()
Specified by:
isIdentifiable in interface ProtocolCodecFactory.Provider
Returns:
true if this wire format factory is identifiable. An identifiable protocol will first write a easy to identify header to the stream

matchesIdentification

public boolean matchesIdentification(org.fusesource.hawtbuf.Buffer byteSequence)
Description copied from interface: ProtocolCodecFactory.Provider
Called to test if this protocol matches the identification header.

Specified by:
matchesIdentification in interface ProtocolCodecFactory.Provider
Parameters:
byteSequence - The byte buffer representing the header data read so far.
Returns:
true if the Buffer matches the protocol format header.

maxIdentificaionLength

public int maxIdentificaionLength()
Specified by:
maxIdentificaionLength in interface ProtocolCodecFactory.Provider
Returns:
Returns the maximum length of the header used to discriminate the wire format if it ProtocolCodecFactory.Provider.isIdentifiable()


Copyright © 2005-2011 The Apache Software Foundation. All Rights Reserved.