Overview | Package | Class | Use | Tree | Serialized | Deprecated | Index | Help
| ABLE 2.3.0 07/13/2005 14:21:00
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.ibm.able.conversation
Class AbleMessageTransformFactory

    java.lang.Object
      com.ibm.able.conversation.AbleOwned
          com.ibm.able.conversation.AbleMessageTransformFactory

All Implemented Interfaces:
  MessageTransformFactory

public class AbleMessageTransformFactory
extends AbleOwned
implements MessageTransformFactory

The AbleMessageTransformFactory is an ABLE-specific implementation of the MessageTransform factory interface.

This factory contains a user-configured table that maps MessageDescription objects onto MessageTransform classes. It uses the table to create MessageTransform objects upon request. It caches the transforms it has created.

The ABLE-specific features consist of the exception messages and the logging and trace-logging mechanisms. The latter are implemented as calls to the appropriate methods on an AbleBean designated as this AbleMessageTransformFactory object's "owner".

Constructor Summary
`AbleMessageTransformFactory()` Constructs an AbleMessageTransformFactory object with a null "owner".
`AbleMessageTransformFactory(AbleBean newOwner)` Constructs an AbleMessageTransformFactory object with the given "owner".

Method Summary
`void` | `addTransform(MessageDescription desc, java.lang.Class transformClass)` Adds the given transform class to the table of transform classes, keyed under the given message description.
`void` | `clear()` Removes all entries from the table of transform classes.
`MessageTransform` | `getDefaultTransform()` Returns the default transform.
`MessageTransform` | `getTransform(MessageDescription desc)` Returns a MessageTransform matching the given message description, or else returns the default transform if no match is found.
`void` | `removeTransform(MessageDescription desc)` Removes the entry matching the given description from the table of transform classes.
`void` | `setDefaultTransform(MessageTransform tf)` Sets the default transform.

Methods inherited from class com.ibm.able.conversation.AbleOwned
`getAbleOwner, logException, logMessage, setAbleOwner`

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

Constructor Detail

### AbleMessageTransformFactory

    public AbleMessageTransformFactory()

  Constructs an AbleMessageTransformFactory object with a null "owner".

### AbleMessageTransformFactory

    public AbleMessageTransformFactory(AbleBean newOwner)

  Constructs an AbleMessageTransformFactory object with the given "owner".

Parameters:
  `newOwner` - The owner.

Method Detail

### getDefaultTransform

    public MessageTransform getDefaultTransform()

  Returns the default transform.

  The default transform is a MessageTransform instance returned by `getTransform()` if the given message description doesn't match anything in the table of transform classes.

  Returns:
    The default transform, or `null` if no default has been set.

### setDefaultTransform

    public void setDefaultTransform(MessageTransform tf)

  Sets the default transform.

  The default transform is a MessageTransform instance returned by `getTransform()` if the given message description doesn't match anything in the table of transform classes.

  Parameters:
    `tf` - The new default transform.

### addTransform

    public void addTransform(MessageDescription desc,
                             java.lang.Class transformClass)

  Adds the given transform class to the table of transform classes, keyed under the given message description.

  Parameters:
    `desc` - The MessageDescription key for the transform class.
    `transformClass` - The transform class.

### removeTransform

    public void removeTransform(MessageDescription desc)

  Removes the entry matching the given description from the table of transform classes.

  Parameters:
    `desc` - The message description to match against, in finding the entry to remove.

### clear

    public void clear()

  Removes all entries from the table of transform classes.

### getTransform

    public MessageTransform getTransform(MessageDescription desc)

  Returns a MessageTransform matching the given message description, or else returns the default transform if no match is found. (Note that the default transform may be null.)

  Specified by:
    `getTransform` in interface `MessageTransformFactory`
  Returns:
    The MessageTransform that was created.
  See Also:
    `MessageTransformFactory.getTransform(MessageDescription)`

Overview | Package | Class | Use | Tree | Serialized | Deprecated | Index | Help
| ABLE 2.3.0 07/13/2005 14:21:00
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

(C) Copyright IBM Corporation 1999, 2005