public interface Exchange
Modifier and Type | Field and Description |
---|---|
static int |
ACTIVE
Status code indicating the exchange is still active.
|
static int |
DONE
Status code indicating the exchange is completed.
|
static int |
ERROR
Status code indicating the exchange has encountered an error.
|
static java.net.URI |
IN_ONLY
URI pattern for an in-only exchange.
|
static java.net.URI |
IN_OPTIONAL_OUT
URI pattern for an in-out exchange.
|
static java.net.URI |
IN_OUT
URI pattern for an in-out exchange.
|
static java.net.URI |
OUT_ONLY
URI pattern for an in-out exchange.
|
Modifier and Type | Method and Description |
---|---|
void |
clearMessage(ParameterType pType)
Removes a message from the exchange.
|
Message |
createMessage(ParameterType pType)
Associates a message with the exchange.
|
ContextLogger |
getAuditLogger()
Provides audit logging capabilities.
|
java.lang.String |
getBinding()
Returns a URI identifying the type of binding used in the exchange.
|
Endpoint |
getEndpoint()
Returns the Endpoint called in the exchange if known.
|
java.lang.String |
getEndpointName()
Returns the name of the endpoint being called.
|
java.lang.Exception |
getError()
Returns the error associated with the exchange (if any).
|
java.lang.String |
getExchangeID()
Returns a unique identifier for the exchange between the two parties.
|
ExternalEndpoint |
getFaultEndpoint()
External endpoint to send a fault to if an asynchronous exchange.
|
Message |
getFaultMessage()
Returns the fault message that is part of the exchange (if any).
|
Message |
getInMessage()
Returns the in message that is part of the exchange (if any).
|
javax.xml.namespace.QName |
getInterfaceName()
Returns the name of the interface being called.
|
java.lang.String |
getOperationName()
Returns the name of the operation being invoked.
|
Message |
getOutMessage()
Returns the out message that is part of the exchange (if any).
|
java.net.URI |
getPattern()
Returns the message exchange pattern to be used.
|
java.util.Map |
getProperties()
Provides direct access to the Map of properties for the exchange.
|
java.lang.Object |
getProperty(java.lang.String name)
Returns the property with the given name.
|
java.util.Set |
getPropertyNames()
Returns the names of the properties associated with the context.
|
ExternalEndpoint |
getResponseEndpoint()
External endpoint to send the response to if an asynchronous exchange.
|
javax.xml.namespace.QName |
getServiceName()
Returns the name of the service being invoked.
|
int |
getStatus()
Returns the status of the exchange (ACTIVE, DONE, ERROR).
|
boolean |
isAsync()
Returns whether the exchange should be completed asynchronously or not.
|
void |
setAsync(boolean isAsync)
Changes whether the exchange should be completed asynchronously or not.
|
void |
setAuditLogger(ContextLogger logger)
Associates an audit logger with the exchange.
|
void |
setBinding(java.lang.String binding)
Changes the URI identifying the type of binding used in the exchange.
|
void |
setEndpoint(Endpoint endpoint)
Changes the Endpoint being called.
|
void |
setEndpointName(java.lang.String epName)
Changes the name of the endpoint in the exchange.
|
void |
setError(java.lang.Exception error)
Records an error encountered while processing the exchange.
|
void |
setFaultEndpoint(ExternalEndpoint endpoint)
Changes the external endpoint to send a fault if an asynchronous
exchange.
|
void |
setInterfaceName(javax.xml.namespace.QName ifName)
Changes the name of the interface being called.
|
void |
setMessage(Message msg,
ParameterType pType)
Places a message in the exchange as the given parameter type, IN, OUT, or FAULT.
|
void |
setOperationName(java.lang.String operationName)
Changes the name of the operation in the context.
|
void |
setPattern(java.net.URI pattern)
Changes the message exchange pattern to be used.
|
void |
setProperties(java.util.Map properties)
Replaces the properties of the exchange in one call for optimization.
|
void |
setProperty(java.lang.String name,
java.lang.Object property)
Adds or replaces a property.
|
void |
setResponseEndpoint(ExternalEndpoint endpoint)
Changes the external endpoint to send the response if an asynchronous
exchange.
|
void |
setServiceName(javax.xml.namespace.QName serviceName)
Changes the name of the service in the context.
|
void |
setStatus(int status)
Changes the status of the exchange.
|
static final int ACTIVE
static final int DONE
static final int ERROR
static final java.net.URI IN_ONLY
static final java.net.URI IN_OUT
static final java.net.URI OUT_ONLY
static final java.net.URI IN_OPTIONAL_OUT
java.lang.String getExchangeID()
java.lang.Object getProperty(java.lang.String name)
name
- Name of the property.void setProperty(java.lang.String name, java.lang.Object property)
name
- Name of the property.property
- Value of the property.java.util.Set getPropertyNames()
java.util.Map getProperties()
void setProperties(java.util.Map properties)
properties
- Map of properties keyed by a String.javax.xml.namespace.QName getServiceName()
void setServiceName(javax.xml.namespace.QName serviceName)
serviceName
- Name of the service.java.lang.String getEndpointName()
Endpoint getEndpoint()
void setEndpointName(java.lang.String epName)
epName
- Name of the endpoint.void setEndpoint(Endpoint endpoint)
endpoint
- Endpoint holding the endpoint information.java.lang.String getBinding()
void setBinding(java.lang.String binding)
binding
- String URI of the binding type. May be null.javax.xml.namespace.QName getInterfaceName()
void setInterfaceName(javax.xml.namespace.QName ifName)
ifName
- Name of the interface.java.lang.String getOperationName()
void setOperationName(java.lang.String operationName)
operationName
- Name of the operation.int getStatus()
void setStatus(int status)
status
- Status of the exchange (ACTIVE, DONE, ERROR).void setError(java.lang.Exception error)
error
- Error holding the error information.java.lang.Exception getError()
Message getInMessage()
Message getOutMessage()
Message getFaultMessage()
Message createMessage(ParameterType pType) throws GException
pType
- ParameterType identifying whether the
message is an IN, OUT, or FAULT.GException
void clearMessage(ParameterType pType) throws GException
pType
- ParameterType identifying the message to remove, IN, OUT, or FAULT.GException
- Thrown if an error prevents the removal.void setMessage(Message msg, ParameterType pType) throws GException
Message
implementations, or instances created from the Exchange itself. For that reason
this is an optional method. Not all implementations will support this method. If
they do not an UnsupportedOperationException
will be thrown.msg
- Message to be added to the Exchange.pType
- ParameterType identifying whether the message is an IN, OUT, or
FAULT.GException
java.net.URI getPattern()
void setPattern(java.net.URI pattern)
pattern
- Message exchange pattern to be used, i.e., IN_OUT, IN_ONLY.boolean isAsync()
void setAsync(boolean isAsync)
isAsync
- True if asynchronous, false if synchronous.ExternalEndpoint getResponseEndpoint()
void setResponseEndpoint(ExternalEndpoint endpoint)
endpoint
- ExternalEndpoint to send asynchronous responses.ExternalEndpoint getFaultEndpoint()
void setFaultEndpoint(ExternalEndpoint endpoint)
endpoint
- ExternalEndpoint to send asynchronous responses.ContextLogger getAuditLogger()
com.soa.log.ContextLogger
. The audit log statements are governed by and viewed
in the management application. Each log statement has a different level of importance or purpose,
debug, warning, or error in that order. These statements will only be seen in the
log if the handler is invoked with a level equal to or greater than that statement.void setAuditLogger(ContextLogger logger)
logger
- Logger.?? 2022 Perforce Software, All rights reserved
This software is the confidential and proprietary information of Perforce, Inc. and is subject to copyright protection under laws of the United States of America and other countries. The use of this software should be in accordance with the license agreement terms you entered into with Perforce, Inc.