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()
Exchange
getExchangeID
in interface Exchange
public void setExchangeID(java.lang.String id)
id
- String ID of the exchange.public javax.xml.namespace.QName getServiceName()
Exchange
getServiceName
in interface Exchange
public void setServiceName(javax.xml.namespace.QName serviceName)
Exchange
setServiceName
in interface Exchange
serviceName
- Name of the service.public java.lang.String getBinding()
Exchange
getBinding
in interface Exchange
public void setBinding(java.lang.String binding)
Exchange
setBinding
in interface Exchange
binding
- String URI of the binding type. May be null.public java.lang.String getEndpointName()
Exchange
getEndpointName
in interface Exchange
public Endpoint getEndpoint()
Exchange
getEndpoint
in interface Exchange
public void setEndpointName(java.lang.String epName)
Exchange
setEndpointName
in interface Exchange
epName
- Name of the endpoint.public void setEndpoint(Endpoint endpoint)
Exchange
setEndpoint
in interface Exchange
endpoint
- Endpoint holding the endpoint information.public javax.xml.namespace.QName getInterfaceName()
Exchange
getInterfaceName
in interface Exchange
public void setInterfaceName(javax.xml.namespace.QName ifName)
Exchange
setInterfaceName
in interface Exchange
ifName
- Name of the interface.public java.lang.String getOperationName()
Exchange
getOperationName
in interface Exchange
public void setOperationName(java.lang.String operationName)
Exchange
setOperationName
in interface Exchange
operationName
- Name of the operation.public java.lang.Object getProperty(java.lang.String name)
Exchange
getProperty
in interface Exchange
name
- Name of the property.public void setProperty(java.lang.String name, java.lang.Object property)
Exchange
setProperty
in interface Exchange
name
- Name of the property.property
- Value of the property.public java.util.Set getPropertyNames()
Exchange
getPropertyNames
in interface Exchange
public java.util.Map getProperties()
Exchange
getProperties
in interface Exchange
public void setProperties(java.util.Map properties)
Exchange
setProperties
in interface Exchange
properties
- Map of properties keyed by a String.public void setError(java.lang.Exception error)
Exchange
public java.lang.Exception getError()
Exchange
public int getStatus()
Exchange
public void setStatus(int status)
Exchange
public Message getInMessage()
Exchange
getInMessage
in interface Exchange
protected void setInMessage(Message msg)
public Message getOutMessage()
Exchange
getOutMessage
in interface Exchange
protected void setOutMessage(Message msg)
public Message getFaultMessage()
Exchange
getFaultMessage
in interface Exchange
protected void setFaultMessage(Message msg)
public Message createMessage(ParameterType pType) throws GException
Exchange
createMessage
in interface Exchange
pType
- ParameterType identifying whether the
message is an IN, OUT, or FAULT.GException
public void clearMessage(ParameterType pType) throws GException
Exchange
clearMessage
in interface Exchange
pType
- 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 Exchange
msg
- Message to be added to the Exchange.pType
- ParameterType identifying whether the message is an IN, OUT, or
FAULT.GException
public 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
GException
public java.net.URI getPattern()
Exchange
getPattern
in interface Exchange
public void setPattern(java.net.URI pattern)
Exchange
setPattern
in interface Exchange
pattern
- Message exchange pattern to be used, i.e., IN_OUT, IN_ONLY.public boolean isAsync()
Exchange
public void setAsync(boolean isAsync)
Exchange
public ExternalEndpoint getResponseEndpoint()
Exchange
getResponseEndpoint
in interface Exchange
public void setResponseEndpoint(ExternalEndpoint endpoint)
Exchange
setResponseEndpoint
in interface Exchange
endpoint
- ExternalEndpoint to send asynchronous responses.public ExternalEndpoint getFaultEndpoint()
Exchange
getFaultEndpoint
in interface Exchange
public void setFaultEndpoint(ExternalEndpoint endpoint)
Exchange
setFaultEndpoint
in interface Exchange
endpoint
- ExternalEndpoint to send asynchronous responses.public ContextLogger getAuditLogger()
Exchange
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.getAuditLogger
in interface Exchange
public void setAuditLogger(ContextLogger logger)
Exchange
setAuditLogger
in interface Exchange
logger
- 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.