org.activemq.io
Class WireFormatLoader

java.lang.Object
  extended by org.activemq.io.WireFormatLoader

public class WireFormatLoader
extends Object

Represents a strategy of encoding packets on the wire or on disk using some kind of serialization or wire format.

We use a default efficient format for Java to Java communication but other formats to other systems can be used, such as using simple text strings when talking to JavaScript or coming up with other formats for talking to C / C# languages or proprietary messaging systems we wish to interface with at the wire level etc.

Version:
$Revision: 1.1.1.1 $

Constructor Summary
WireFormatLoader()
          Default Constructor
WireFormatLoader(WireFormat prefered)
          Construct WireFormatLoader with the prefered WireFormat
 
Method Summary
protected static JMSException createJMSexception(String protocol, Exception e)
           
 WireFormat getPreferedWireFormat()
           
 WireFormat getWireFormat(DataInputStream dataIn)
          Create a wire format
static WireFormat getWireFormat(String format)
          load a WireFormat by name - e.g.
 void setPreferedWireFormat(WireFormat preferedWireFormat)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WireFormatLoader

public WireFormatLoader()
Default Constructor


WireFormatLoader

public WireFormatLoader(WireFormat prefered)
Construct WireFormatLoader with the prefered WireFormat

Parameters:
prefered -
Method Detail

getWireFormat

public WireFormat getWireFormat(DataInputStream dataIn)
                         throws JMSException,
                                IOException
Create a wire format

Parameters:
dataIn -
Returns:
the WireFormat
Throws:
JMSException
IOException

getPreferedWireFormat

public WireFormat getPreferedWireFormat()
Returns:
Returns the preferedWireFormat.

setPreferedWireFormat

public void setPreferedWireFormat(WireFormat preferedWireFormat)
Parameters:
preferedWireFormat - The preferedWireFormat to set.

getWireFormat

public static WireFormat getWireFormat(String format)
                                throws JMSException
load a WireFormat by name - e.g. 'default','amqpfast' etc.

Parameters:
format -
Returns:
the wire format
Throws:
JMSException

createJMSexception

protected static JMSException createJMSexception(String protocol,
                                                 Exception e)


Copyright © 2004-2009 Protique, Ltd.. All Rights Reserved.