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

## com.bea.rfid.edge.toolkit.workflow
Class AbstractWorkflowModulePlugin.OneWayInputPortImpl

    java.lang.Object
      com.bea.rfid.edge.toolkit.workflow.PortImpl
          com.bea.rfid.edge.toolkit.workflow.AbstractWorkflowModulePlugin.OneWayInputPortImpl

All Implemented Interfaces:
  OneWayInputPort, Port

Enclosing class:
  AbstractWorkflowModulePlugin

    public abstract class AbstractWorkflowModulePlugin.OneWayInputPortImpl

extends PortImpl
implements OneWayInputPort

Inner class implementation of `OneWayInputPort`. Edge flow module ports that want to make use of edge server event handling mechanism may do that easily by extending this class and implementing the abstract method `processMessage`.

Constructor Summary
`AbstractWorkflowModulePlugin.OneWayInputPortImpl(Port port)` Constructor that just takes in a `Port` and constructs OneWayInputPort using it.
`AbstractWorkflowModulePlugin.OneWayInputPortImpl(String name, String displayName, PortType portType)` Constructor.

Method Summary
`protected void` | `log(Level severity, String errorMsg)` Utility method to log a message from an input port.
`protected void` | `log(Level severity, String errorMsg, Throwable thrown)` Utility method to log an exception from an input port.
`protected abstract void` | `processMessage(Object msg)` The method that does the actual work of processing the message.
`void` | `receiveMessage(Object msg)` Interface method implementation.
`protected void` | `sendErrorOutput(Level severity, String errorMsg, Throwable exc)` Utility method to create an ErrorOutput object for an exception within a port and send it to error destinations.

Methods inherited from class com.bea.rfid.edge.toolkit.workflow.PortImpl
`getDisplayName, getName, getPortType`

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

Methods inherited from interface com.bea.rfid.edge.api.workflow.Port
`getDisplayName, getName, getPortType`

Constructor Detail

### AbstractWorkflowModulePlugin.OneWayInputPortImpl

    public AbstractWorkflowModulePlugin.OneWayInputPortImpl(String name,
                                                            String displayName,
                                                            PortType portType)

  Constructor.

  Parameters:
    `name` - Name of the port.
    `displayName` - Display name of the port.
    `portType` - The `PortType` of the port.

### AbstractWorkflowModulePlugin.OneWayInputPortImpl

    public AbstractWorkflowModulePlugin.OneWayInputPortImpl(Port port)

  Constructor that just takes in a `Port` and constructs OneWayInputPort using it.

  Parameters:
    `port` - The Port whose details will be used to create the OneWayInputPort.

Method Detail

### receiveMessage

    public void receiveMessage(Object msg)

  Interface method implementation. This calls the abstract method `processMessage` using the event queue mechanism. The actual processing happens in `processMessage`, which is implementation specific. This method also takes care of exceptions during message processing by sending the exception details to the error output port.

  Specified by:
    `receiveMessage` in interface `OneWayInputPort`
  Parameters:
    `msg` - Input message to the port.

### processMessage

    protected abstract void processMessage(Object msg)
                                    throws Exception

  The method that does the actual work of processing the message. This method is called by `receiveMessage` using the event handling mechanism.

  Parameters:
    `msg` - The input message to the port.
  Throws:
    `Exception` - If an error occurs while processing the message. Since the exceptions that could happen are specific to the modules, we are allowing generic exception here. However, this means that if a port wants to treat certain exceptions differently (not just send error details on error output), it should catch it explicitly.

### log

    protected void log(Level severity,
                       String errorMsg)

  Utility method to log a message from an input port. This method adds context information, module name and port name, to the error message.

  Parameters:
    `severity` - The severity level of the error.
    `errorMsg` - The error message.

### log

    protected void log(Level severity,
                       String errorMsg,
                       Throwable thrown)

  Utility method to log an exception from an input port. This method adds context information, module name and port name, to the error message.

  Parameters:
    `severity` - The severity level of the error.
    `errorMsg` - The error message.
    `thrown` - The exception that is to be logged.

### sendErrorOutput

    protected void sendErrorOutput(Level severity,
                                   String errorMsg,
                                   Throwable exc)

  Utility method to create an ErrorOutput object for an exception within a port and send it to error destinations. This method adds the module name and port name as the source of the error produced.

  Parameters:
    `severity` - The severity level to use on the error output.
    `errorMsg` - The error message.
    `exc` - The exception that is the cause of the error output.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Documentation is available at ${DOCSWEBROOT} Copyright 2007 BEA Systems Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD