javax.jbi.messaging
インタフェース MessageExchange

既知のサブインタフェースの一覧:
InOnly, InOptionalOut, InOut, RobustInOnly

public interface MessageExchange

MessageExchange represents a container for normalized messages which are described by an exchange pattern. The exchange pattern defines the names, sequence, and cardinality of messages in an exchange.

作成者:
JSR208 Expert Group

入れ子のクラスの概要
static class MessageExchange.Role
          Typesafe enum containing the roles a component can play in a service.
 
フィールドの概要
static java.lang.String JTA_TRANSACTION_PROPERTY_NAME
          JTA transaction context property name.
 
メソッドの概要
 Fault createFault()
          Generic factory method for Fault objects.
 NormalizedMessage createMessage()
          Creates a normalized message based on the specified message reference.
 ServiceEndpoint getEndpoint()
          Retrieves the endpoint used by this exchange.
 java.lang.Exception getError()
          Retrieves the Exception describing the exchanges error status.
 java.lang.String getExchangeId()
          Returns the unique identifier assigned by the NMS for this exchange.
 Fault getFault()
          Retrieves the fault message for this exchange, if one exists.
 javax.xml.namespace.QName getInterfaceName()
          Retrieves the interface name used by this exchange.
 NormalizedMessage getMessage(java.lang.String name)
          Retrieves a normalized message based on the specified message reference.
 javax.xml.namespace.QName getOperation()
          Retrieves the operation used by this exchange.
 java.net.URI getPattern()
          Returns the URI of the pattern for this exchange.
 java.lang.Object getProperty(java.lang.String name)
          Retrieves the specified property from the exchange.
 java.util.Set getPropertyNames()
          Returns the name of all properties for this exchange.
 MessageExchange.Role getRole()
          Queries the role that the caller plays in the exchange.
 javax.xml.namespace.QName getService()
          Retrieves the service used by this exchange.
 ExchangeStatus getStatus()
          Returns the processing status of the exchange.
 boolean isTransacted()
          Queries the existence of a transaction context.
 void setEndpoint(ServiceEndpoint endpoint)
          Specifies the endpoint used by this exchange.
 void setError(java.lang.Exception error)
          Used to specify the source of a failure status.
 void setFault(Fault fault)
          Specifies the fault message for this exchange, if one exists.
 void setInterfaceName(javax.xml.namespace.QName interfaceName)
          Specifies the interface name used by this exchange.
 void setMessage(NormalizedMessage msg, java.lang.String name)
          Sets a normalized message with the specified message reference.
 void setOperation(javax.xml.namespace.QName name)
          Specifies the operation used by this exchange.
 void setProperty(java.lang.String name, java.lang.Object obj)
          Specifies a property for the exchange.
 void setService(javax.xml.namespace.QName service)
          Specifies the service used by this exchange.
 void setStatus(ExchangeStatus status)
          Sets the processing status of the exchange.
 

フィールドの詳細

JTA_TRANSACTION_PROPERTY_NAME

static final java.lang.String JTA_TRANSACTION_PROPERTY_NAME
JTA transaction context property name.

関連項目:
定数フィールド値
メソッドの詳細

getPattern

java.net.URI getPattern()
Returns the URI of the pattern for this exchange.

戻り値:
pattern URI for this exchange

getExchangeId

java.lang.String getExchangeId()
Returns the unique identifier assigned by the NMS for this exchange.

戻り値:
unique id for this exchange

getStatus

ExchangeStatus getStatus()
Returns the processing status of the exchange.

戻り値:
status of the exchange

setStatus

void setStatus(ExchangeStatus status)
               throws MessagingException
Sets the processing status of the exchange.

パラメータ:
status - exchange status
例外:
MessagingException - failed to set status, possibly due to an invalid state transition.

setError

void setError(java.lang.Exception error)
Used to specify the source of a failure status. Invoking this method automatically adjusts the status of the ME to ExchangeStatus.ERROR.

パラメータ:
error - error cause

getError

java.lang.Exception getError()
Retrieves the Exception describing the exchanges error status.

戻り値:
exception associated with this exchange

getFault

Fault getFault()
Retrieves the fault message for this exchange, if one exists. A fault/message reference is unnecessary, since an exchange can carry at most one fault, and it is always the final message in an exchange.

戻り値:
fault associated with the exchange, or null if not present

setFault

void setFault(Fault fault)
              throws MessagingException
Specifies the fault message for this exchange, if one exists. A fault/message reference is unnecessary, since an exchange can carry at most one fault, and it is always the final message in an exchange.

パラメータ:
fault - fault
例外:
MessagingException - operation not permitted in the current exchange state

createMessage

NormalizedMessage createMessage()
                                throws MessagingException
Creates a normalized message based on the specified message reference. The pattern governing this exchange must contain a definition for the reference name supplied.

戻り値:
a new normalized message
例外:
MessagingException - failed to create message

createFault

Fault createFault()
                  throws MessagingException
Generic factory method for Fault objects.

戻り値:
a new fault
例外:
MessagingException - failed to create fault

getMessage

NormalizedMessage getMessage(java.lang.String name)
Retrieves a normalized message based on the specified message reference.

パラメータ:
name - message reference
戻り値:
message with the specified reference name

setMessage

void setMessage(NormalizedMessage msg,
                java.lang.String name)
                throws MessagingException
Sets a normalized message with the specified message reference. The pattern governing this exchange must contain a definition for the reference name supplied.

パラメータ:
msg - normalized message
name - message reference
例外:
MessagingException - operation not permitted in the current exchange state

getProperty

java.lang.Object getProperty(java.lang.String name)
Retrieves the specified property from the exchange.

パラメータ:
name - property name
戻り値:
property value

setProperty

void setProperty(java.lang.String name,
                 java.lang.Object obj)
Specifies a property for the exchange.

パラメータ:
name - property name
obj - property value

setEndpoint

void setEndpoint(ServiceEndpoint endpoint)
Specifies the endpoint used by this exchange.

パラメータ:
endpoint - endpoint address

setService

void setService(javax.xml.namespace.QName service)
Specifies the service used by this exchange.

パラメータ:
service - service address

setInterfaceName

void setInterfaceName(javax.xml.namespace.QName interfaceName)
Specifies the interface name used by this exchange.

パラメータ:
interfaceName - interface name

setOperation

void setOperation(javax.xml.namespace.QName name)
Specifies the operation used by this exchange.

パラメータ:
name - operation name

getEndpoint

ServiceEndpoint getEndpoint()
Retrieves the endpoint used by this exchange.

戻り値:
endpoint address for this message exchange

getInterfaceName

javax.xml.namespace.QName getInterfaceName()
Retrieves the interface name used by this exchange.

戻り値:
interface used for this message exchange

getService

javax.xml.namespace.QName getService()
Retrieves the service used by this exchange.

戻り値:
service address for this message exchange

getOperation

javax.xml.namespace.QName getOperation()
Retrieves the operation used by this exchange.

戻り値:
operation name for this message exchange

isTransacted

boolean isTransacted()
Queries the existence of a transaction context.

戻り値:
boolean transactional state of the exchange

getRole

MessageExchange.Role getRole()
Queries the role that the caller plays in the exchange.

戻り値:
Role expected of caller.

getPropertyNames

java.util.Set getPropertyNames()
Returns the name of all properties for this exchange.

戻り値:
a set of all the property names, as Strings.


Copyright (C) 1998 - 2012 NEC Corporation. All rights reserved.