org.apache.activemq.apollo.transport
Interface ProtocolCodecFactory.Provider

All Known Implementing Classes:
ObjectStreamProtocolCodecFactory
Enclosing class:
ProtocolCodecFactory

public static interface ProtocolCodecFactory.Provider


Method Summary
 ProtocolCodec createProtocolCodec()
           
 boolean isIdentifiable()
           
 boolean matchesIdentification(org.fusesource.hawtbuf.Buffer buffer)
          Called to test if this protocol matches the identification header.
 int maxIdentificaionLength()
           
 java.lang.String protocol()
           
 

Method Detail

protocol

java.lang.String protocol()

createProtocolCodec

ProtocolCodec createProtocolCodec()
Returns:
an instance of the wire format.

isIdentifiable

boolean isIdentifiable()
Returns:
true if this wire format factory is identifiable. An identifiable protocol will first write a easy to identify header to the stream

maxIdentificaionLength

int maxIdentificaionLength()
Returns:
Returns the maximum length of the header used to discriminate the wire format if it isIdentifiable()
Throws:
java.lang.UnsupportedOperationException - If isIdentifiable() is false

matchesIdentification

boolean matchesIdentification(org.fusesource.hawtbuf.Buffer buffer)
Called to test if this protocol matches the identification header.

Parameters:
buffer - The byte buffer representing the header data read so far.
Returns:
true if the Buffer matches the protocol format header.


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