public abstract class AbstractExchange extends java.lang.Object implements Exchange
| Constructor and Description |
|---|
AbstractExchange() |
| Modifier and Type | Method and Description |
|---|---|
void |
addPart(java.lang.String name,
java.lang.Object part) |
boolean |
arePartsEmpty() |
void |
clearMessage(ParameterType pType)
Removes a message from the exchange.
|
protected abstract Message |
createMessage() |
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).
|
void |
getPart(java.lang.String name) |
java.util.Set<java.lang.String> |
getPartNames() |
java.util.Map<java.lang.String,java.lang.Object> |
getParts() |
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 |
setExchangeID(java.lang.String id)
Initializes the ID of the exchange.
|
void |
setFaultEndpoint(ExternalEndpoint endpoint)
Changes the external endpoint to send a fault if an asynchronous
exchange.
|
protected void |
setFaultMessage(Message msg) |
protected void |
setInMessage(Message msg) |
void |
setInterfaceName(javax.xml.namespace.QName ifName)
Changes the name of the interface being called.
|
void |
setMessage(Message msg,
ParameterType pType)
Default implementation throws
UnsupportedOperationException. |
protected void |
setMessageImpl(Message msg,
ParameterType pType) |
void |
setOperationName(java.lang.String operationName)
Changes the name of the operation in the context.
|
protected void |
setOutMessage(Message msg) |
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.
|
public java.lang.String getExchangeID()
ExchangegetExchangeID in interface Exchangepublic void setExchangeID(java.lang.String id)
id - String ID of the exchange.public javax.xml.namespace.QName getServiceName()
ExchangegetServiceName in interface Exchangepublic void setServiceName(javax.xml.namespace.QName serviceName)
ExchangesetServiceName in interface ExchangeserviceName - Name of the service.public java.lang.String getBinding()
ExchangegetBinding in interface Exchangepublic void setBinding(java.lang.String binding)
ExchangesetBinding in interface Exchangebinding - String URI of the binding type. May be null.public java.lang.String getEndpointName()
ExchangegetEndpointName in interface Exchangepublic Endpoint getEndpoint()
ExchangegetEndpoint in interface Exchangepublic void setEndpointName(java.lang.String epName)
ExchangesetEndpointName in interface ExchangeepName - Name of the endpoint.public void setEndpoint(Endpoint endpoint)
ExchangesetEndpoint in interface Exchangeendpoint - Endpoint holding the endpoint information.public javax.xml.namespace.QName getInterfaceName()
ExchangegetInterfaceName in interface Exchangepublic void setInterfaceName(javax.xml.namespace.QName ifName)
ExchangesetInterfaceName in interface ExchangeifName - Name of the interface.public java.lang.String getOperationName()
ExchangegetOperationName in interface Exchangepublic void setOperationName(java.lang.String operationName)
ExchangesetOperationName in interface ExchangeoperationName - Name of the operation.public java.lang.Object getProperty(java.lang.String name)
ExchangegetProperty in interface Exchangename - Name of the property.public void setProperty(java.lang.String name,
java.lang.Object property)
ExchangesetProperty in interface Exchangename - Name of the property.property - Value of the property.public java.util.Set getPropertyNames()
ExchangegetPropertyNames in interface Exchangepublic java.util.Map getProperties()
ExchangegetProperties in interface Exchangepublic void setProperties(java.util.Map properties)
ExchangesetProperties in interface Exchangeproperties - Map of properties keyed by a String.public void setError(java.lang.Exception error)
Exchangepublic java.lang.Exception getError()
Exchangepublic int getStatus()
Exchangepublic void setStatus(int status)
Exchangepublic Message getInMessage()
ExchangegetInMessage in interface Exchangeprotected void setInMessage(Message msg)
public Message getOutMessage()
ExchangegetOutMessage in interface Exchangeprotected void setOutMessage(Message msg)
public Message getFaultMessage()
ExchangegetFaultMessage in interface Exchangeprotected void setFaultMessage(Message msg)
public Message createMessage(ParameterType pType) throws GException
ExchangecreateMessage in interface ExchangepType - ParameterType identifying whether the
message is an IN, OUT, or FAULT.GExceptionpublic void clearMessage(ParameterType pType) throws GException
ExchangeclearMessage in interface ExchangepType - ParameterType identifying the message to remove, IN, OUT, or FAULT.GException - Thrown if an error prevents the removal.public void setMessage(Message msg, ParameterType pType) throws GException
UnsupportedOperationException.setMessage in interface Exchangemsg - Message to be added to the Exchange.pType - ParameterType identifying whether the message is an IN, OUT, or
FAULT.GExceptionpublic void addPart(java.lang.String name,
java.lang.Object part)
public void getPart(java.lang.String name)
public java.util.Set<java.lang.String> getPartNames()
public boolean arePartsEmpty()
public java.util.Map<java.lang.String,java.lang.Object> getParts()
protected void setMessageImpl(Message msg, ParameterType pType) throws GException
GExceptionpublic java.net.URI getPattern()
ExchangegetPattern in interface Exchangepublic void setPattern(java.net.URI pattern)
ExchangesetPattern in interface Exchangepattern - Message exchange pattern to be used, i.e., IN_OUT, IN_ONLY.public boolean isAsync()
Exchangepublic void setAsync(boolean isAsync)
Exchangepublic ExternalEndpoint getResponseEndpoint()
ExchangegetResponseEndpoint in interface Exchangepublic void setResponseEndpoint(ExternalEndpoint endpoint)
ExchangesetResponseEndpoint in interface Exchangeendpoint - ExternalEndpoint to send asynchronous responses.public ExternalEndpoint getFaultEndpoint()
ExchangegetFaultEndpoint in interface Exchangepublic void setFaultEndpoint(ExternalEndpoint endpoint)
ExchangesetFaultEndpoint in interface Exchangeendpoint - ExternalEndpoint to send asynchronous responses.public ContextLogger getAuditLogger()
Exchangecom.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.getAuditLogger in interface Exchangepublic void setAuditLogger(ContextLogger logger)
ExchangesetAuditLogger in interface Exchangelogger - Logger.protected abstract Message createMessage() throws GException
GException?? 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.