Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jboss.remoting.marshal
Class MarshalFactory

    java.lang.Object
      org.jboss.remoting.marshal.MarshalFactory

    public class MarshalFactory

extends java.lang.Object

This class will provide marshallers and unmarshallers for data based on the data type want to marshal to. The most common will be just to serialize the data. However, may have jaxrpc, IIOP, serializers. Can also have marshallers and unmarshallers based on class type. For example, might be marshaller/unmarshaller for the Transaction class.

Author:
  Tom Elrod

Field Summary
`protected static org.jboss.logging.Logger` | `log`

Constructor Summary
`MarshalFactory()`

Method Summary
`static void` | `addMarshaller(java.lang.Class classType, Marshaller marshaller, UnMarshaller unMarshaller)` Will add the marshaller and unmarshaller based on class type.
`static void` | `addMarshaller(java.lang.String dataType, Marshaller marshaller, UnMarshaller unMarshaller)` Adds the marshaller and unmarshaller based on data type.
`static Marshaller` | `getMarshaller(java.lang.Class classType)` Looks up marshaller by class type.
`static Marshaller` | `getMarshaller(java.lang.Class classType, java.lang.String serializationType)` Looks up marshaller by class type.
`static Marshaller` | `getMarshaller(InvokerLocator locator, java.lang.ClassLoader classLoader)` Will try to look up marshaller by first looking for data type parameter within locator and then using that to look up marhsaller locally.
`static Marshaller` | `getMarshaller(java.lang.String dataType)` Gets marshaller based on data type (i.e.
`static Marshaller` | `getMarshaller(java.lang.String dataType, java.lang.String serializationType)`
`static UnMarshaller` | `getUnMarshaller(java.lang.Class classType)` Returns unmarshaller by class type.
`static UnMarshaller` | `getUnMarshaller(java.lang.Class classType, java.lang.String serializationType)`
`static UnMarshaller` | `getUnMarshaller(InvokerLocator locator, java.lang.ClassLoader classLoader)` Will try to look up unmarshaller by first looking for data type parameter within locator and then using that to look up unmarshaller locally.
`static UnMarshaller` | `getUnMarshaller(java.lang.String dataType)` Gets the marshaller based on data type (i.e.
`static UnMarshaller` | `getUnMarshaller(java.lang.String dataType, java.lang.String serializationType)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### log

    protected static final org.jboss.logging.Logger log

Constructor Detail

### MarshalFactory

    public MarshalFactory()

Method Detail

### addMarshaller

    public static void addMarshaller(java.lang.Class classType,
                                     Marshaller marshaller,
                                     UnMarshaller unMarshaller)

  Will add the marshaller and unmarshaller based on class type. Each can then be retrieved using the class type as key.

  Parameters:
    `classType` -
    `marshaller` -
    `unMarshaller` -

### addMarshaller

    public static void addMarshaller(java.lang.String dataType,
                                     Marshaller marshaller,
                                     UnMarshaller unMarshaller)

  Adds the marshaller and unmarshaller based on data type. Each can then be retrieved using the data type as the key.

  Parameters:
    `dataType` -
    `marshaller` -
    `unMarshaller` -

### getMarshaller

    public static Marshaller getMarshaller(java.lang.Class classType)

  Looks up marshaller by class type. Will return null if not found.

  Parameters:
    `classType` -
  Returns:

### getMarshaller

    public static Marshaller getMarshaller(java.lang.Class classType,
                                           java.lang.String serializationType)

  Looks up marshaller by class type. Will return null if not found.

  Parameters:
    `classType` -
  Returns:

### getUnMarshaller

    public static UnMarshaller getUnMarshaller(java.lang.Class classType)

  Returns unmarshaller by class type. Will return null if not found.

  Parameters:
    `classType` -
  Returns:

### getUnMarshaller

    public static UnMarshaller getUnMarshaller(java.lang.Class classType,
                                               java.lang.String serializationType)

### getMarshaller

    public static Marshaller getMarshaller(java.lang.String dataType)

  Gets marshaller based on data type (i.e. serializable) and based on the marshallers registered with the factory.

  Parameters:
    `dataType` -
  Returns:
    The marshaller or null if none for for the specified type

### getMarshaller

    public static Marshaller getMarshaller(java.lang.String dataType,
                                           java.lang.String serializationType)

### getUnMarshaller

    public static UnMarshaller getUnMarshaller(java.lang.String dataType,
                                               java.lang.String serializationType)

### getUnMarshaller

    public static UnMarshaller getUnMarshaller(java.lang.String dataType)

  Gets the marshaller based on data type (i.e. serialziable) and based on the unmarshallers registered with the factory.

  Parameters:
    `dataType` -
  Returns:
    The unmarshaller or null if none for the specified type

### getMarshaller

    public static Marshaller getMarshaller(InvokerLocator locator,
                                           java.lang.ClassLoader classLoader)

  Will try to look up marshaller by first looking for data type parameter within locator and then using that to look up marhsaller locally. If can not find it, will then look to see if can find the 'marshaller' parameter within the locator parameters. If found, will try to load the marshaller by the class name specified as the parameter value. If still can not find the class within the local VM, will look to see if there is a parameter for the server's marshaller loader port. If this exists, will then try calling on the remote server to load the marshaller (and its related classes) within the local VM. If still can not be found, will return null.

  Parameters:
    `locator` -
    `classLoader` -
  Returns:

### getUnMarshaller

    public static UnMarshaller getUnMarshaller(InvokerLocator locator,
                                               java.lang.ClassLoader classLoader)

  Will try to look up unmarshaller by first looking for data type parameter within locator and then using that to look up unmarshaller locally. If can not find it, will then look to see if can find the 'unmarshaller' parameter within the locator parameters. If found, will try to load the unmarshaller by the class name specified as the parameter value. If still can not find the class within the local VM, will look to see if there is a parameter for the server's marshaller loader port. If this exists, will then try calling on the remote server to load the unmarshaller (and its related classes) within the local VM. If still can not be found, will return null.

  Parameters:
    `locator` -
    `classLoader` -
  Returns:

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright ? 1998-2005 JBoss Inc . All Rights Reserved.