BEA Systems, Inc.

com.bea.rfid.edge.toolkit.workflow
Class SimpleOneWayPortType

java.lang.Object
  extended by com.bea.rfid.edge.toolkit.workflow.SimpleOneWayPortType
All Implemented Interfaces:
PortType

public class SimpleOneWayPortType
extends Object
implements PortType

Represents a port type that sends or receives one-way scalar type messages. This port type will not accept java.util.List or any other Collection type.

For convenience, commonly used simple port types are defined as constants in this class. Using these constants will also ensure that the same display names are used for the same types.


Field Summary
static SimpleOneWayPortType ANY_OBJECT
          Type that sends/receives objects of type Object.
static SimpleOneWayPortType BOOLEAN
          Type that sends/receives objects of type Boolean.
static SimpleOneWayPortType ECREPORTS
          Type that sends/receives objects of type com.connecterra.alepc.api.ECReports.
static SimpleOneWayPortType EPC_CACHE_REPORT
          Type that sends/receives objects of type com.connecterra.alepc.api.EPCCacheReport.
static SimpleOneWayPortType EPCIS_DOC
          Type that sends/receives objects of type com.connecterra.epcis.api.EPCISDocument.
static SimpleOneWayPortType ERROR
          Type that sends/receives objects of type ErrorOutput.
static SimpleOneWayPortType INTEGER
          Type that sends/receives objects of type Integer.
static SimpleOneWayPortType MANIFEST
          Type that sends/receives objects of type Manifest.
static SimpleOneWayPortType MODULE_STATE
          Type that sends/receives objects of type WorkflowModuleState.
static SimpleOneWayPortType PCSPEC
          Type that sends/receives objects of type com.connecterra.alepc.api.PCSpec.
static SimpleOneWayPortType PCWRITE_REPORT
          Type that sends/receives objects of type com.connecterra.alepc.api.PCWriteReport.
static SimpleOneWayPortType STRING
          Type that sends/receives objects of type String.
static SimpleOneWayPortType TRIGGER
          Type that sends/receives objects of type TriggerOutput.
static SimpleOneWayPortType URI_STRING
          Type that sends/receives objects of type String.
static SimpleOneWayPortType XML_DOCUMENT
          Type that sends/receives objects of type org.w3c.dom.Document.
 
Constructor Summary
SimpleOneWayPortType(Class clazz, String displayName)
          Constructor.
 
Method Summary
 boolean canAcceptMessage(Object msg)
          Interface method implementation.
 String getDisplayName()
          Returns the display name for this port type.
 Class getPortClass()
          Returns the Class of the message objects that this port sends or receives.
 String getStringRepresentation()
          Returns a string representation that uniquely identifies equivalent port types.
 boolean isWirableFrom(PortType fromType)
          Interface method implementation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

XML_DOCUMENT

public static SimpleOneWayPortType XML_DOCUMENT
Type that sends/receives objects of type org.w3c.dom.Document.


ANY_OBJECT

public static SimpleOneWayPortType ANY_OBJECT
Type that sends/receives objects of type Object.


INTEGER

public static SimpleOneWayPortType INTEGER
Type that sends/receives objects of type Integer.


BOOLEAN

public static SimpleOneWayPortType BOOLEAN
Type that sends/receives objects of type Boolean.


URI_STRING

public static SimpleOneWayPortType URI_STRING
Type that sends/receives objects of type String. The string must be the string representation of a URI. This port type currently does not enforce that it is a valid URI string, but, is just defined as a convenience to use a display name that says it is a URI string.


STRING

public static SimpleOneWayPortType STRING
Type that sends/receives objects of type String.


TRIGGER

public static SimpleOneWayPortType TRIGGER
Type that sends/receives objects of type TriggerOutput.


ERROR

public static SimpleOneWayPortType ERROR
Type that sends/receives objects of type ErrorOutput.


MODULE_STATE

public static SimpleOneWayPortType MODULE_STATE
Type that sends/receives objects of type WorkflowModuleState.


MANIFEST

public static SimpleOneWayPortType MANIFEST
Type that sends/receives objects of type Manifest.


EPCIS_DOC

public static SimpleOneWayPortType EPCIS_DOC
Type that sends/receives objects of type com.connecterra.epcis.api.EPCISDocument.


PCWRITE_REPORT

public static SimpleOneWayPortType PCWRITE_REPORT
Type that sends/receives objects of type com.connecterra.alepc.api.PCWriteReport.


PCSPEC

public static SimpleOneWayPortType PCSPEC
Type that sends/receives objects of type com.connecterra.alepc.api.PCSpec.


ECREPORTS

public static SimpleOneWayPortType ECREPORTS
Type that sends/receives objects of type com.connecterra.alepc.api.ECReports.


EPC_CACHE_REPORT

public static SimpleOneWayPortType EPC_CACHE_REPORT
Type that sends/receives objects of type com.connecterra.alepc.api.EPCCacheReport.

Constructor Detail

SimpleOneWayPortType

public SimpleOneWayPortType(Class clazz,
                            String displayName)
Constructor.

Parameters:
clazz - The Class of the message objects that this port sends/receives.
displayName - The user facing name for this port type.
Method Detail

getPortClass

public Class getPortClass()
Returns the Class of the message objects that this port sends or receives.

Returns:
The class of the message objects that this port sends or receives.

isWirableFrom

public boolean isWirableFrom(PortType fromType)
Interface method implementation. This port type is wirable from other SimpleOneWayPortTypes of the same port class. It is also wirable from AnyPortType and MultiTypeOneWayPortType that supports this port class.

Specified by:
isWirableFrom in interface PortType
Parameters:
fromType - The PortType from which this is to be connected.
Returns:
Returns true if it is valid to connect the given PortType to this; False otherwise.

getDisplayName

public String getDisplayName()
Description copied from interface: PortType
Returns the display name for this port type. This value may be used in GUIs and such to give visual cue to users of the modules.

Specified by:
getDisplayName in interface PortType
Returns:
Display name of the port type.

getStringRepresentation

public String getStringRepresentation()
Description copied from interface: PortType
Returns a string representation that uniquely identifies equivalent port types. This is a temporary mechanism used to represent a port type in dynamic set parameters in dynamic configuration.

Specified by:
getStringRepresentation in interface PortType

canAcceptMessage

public boolean canAcceptMessage(Object msg)
Interface method implementation. This port type takes any object that is an instance of its port class.

Specified by:
canAcceptMessage in interface PortType
Parameters:
msg - The message that is to be sent.
Returns:
Returns true if the port type will accept the message. False otherwise.

Documentation is available at
${DOCSWEBROOT}
Copyright 2007 BEA Systems Inc.