public class WSAContext extends API
WS-Addressing context inteface. This class implements a number of methods to set and get data from the addressing contexts attached to the current requester or provider application. Namespace http://www.w3.org/2005/08/addressing.
com.ibm.cics.server.API
for general restrictions on using the JCICS API.
Modifier and Type | Field and Description |
---|---|
static int |
FAULTTOEPR
EPRTYPE cvda value FAULTTOEPR
|
static int |
FROMEPR
EPRTYPE cvda value FROMEPR
|
static int |
REPLYTOEPR
EPRTYPE cvda value REPLYTOEPR
|
static int |
REQCONTEXT
Request Context cvda value
|
static int |
RESPCONTEXT
Response Context cvda value
|
static int |
TOEPR
EPRTYPE cvda value TOEPR
|
Constructor and Description |
---|
WSAContext() |
Modifier and Type | Method and Description |
---|---|
void |
delete()
Deletes WS-Addressing request and response contexts.
|
static void |
delete(java.lang.String channel)
Deletes WS-Addressing request and response contexts.
|
java.lang.String |
getAction(int contextType)
Gets the action MAP from the specified addressing context.
|
java.lang.String |
getChannel()
Gets the name of the channel which contains the addressing contexts.
|
java.lang.String |
getEpr(int contextType,
int eprType)
Gets the complete EPR from the specified addressing context for the
specified EPR type.
|
java.lang.String |
getEprAddress(int contextType,
int eprType)
Gets the EPR address from the specified addressing context for the
specified EPR.
|
java.lang.String |
getEprMetadata(int contextType,
int eprType)
Gets the EPR metadata from the specified addressing context for the
specified EPR.
|
java.lang.String |
getEprRefParms(int contextType,
int eprType)
Gets the EPR Reference parameters from the specified addressing context for the
specified EPR.
|
java.lang.String |
getMessageId(int contextType)
Gets the messageId MAP from the specified addressing context.
|
java.lang.String |
getNationalLang()
Gets the national language if previously set.
|
java.util.Map<java.lang.String,java.lang.String> |
getRelatesTo(int contextType)
Gets a Map of relatesTo MAPs from the specified addressing context.
|
void |
setAction(java.lang.String action)
Sets the action MAP in the request addressing context.
|
void |
setChannel(java.lang.String channel)
Sets the name of the channel which contains the addressing contexts.
|
void |
setEpr(int eprType,
java.lang.String epr)
Sets the complete EPR in the request addressing context
for the specified EPR type.
|
void |
setEprAddress(int eprType,
java.lang.String address)
Sets the EPR address in the request addressing context for the specified
EPR.
|
void |
setEprMetadata(int eprType,
java.lang.String metadata)
Sets the EPR metadata in the request addressing context
for the specified EPR.
|
void |
setEprRefParms(int eprType,
java.lang.String refparms)
Sets the EPR reference parameters in the request addressing context
for the specified EPR.
|
void |
setMessageId(java.lang.String messageId)
Sets the messageId MAP in the request addressing context.
|
void |
setNationalLang(java.lang.String natlang)
Sets the national language to use when building the addressing context.
|
void |
setRelatesTo(java.lang.String relatesURI)
Sets a relatesTo MAP in the request addressing context consisting
of a URI.
|
void |
setRelatesTo(java.lang.String relatesURI,
java.lang.String relatesType)
Sets a relatesTo MAP in the request addressing context consisting
of a URI and type URI.
|
public static final int FROMEPR
public static final int TOEPR
public static final int REPLYTOEPR
public static final int FAULTTOEPR
public static final int REQCONTEXT
public static final int RESPCONTEXT
public static void delete(java.lang.String channel) throws InvalidRequestException, ChannelErrorException, RecordNotFoundException
channel
- The name of channel with the WS-Addressing context containers.ChannelErrorException
- A problem locating the channel occured.InvalidRequestException
- The delete method can only be used in a requester.RecordNotFoundException
- The addressing context could not be located.public void delete() throws java.lang.IllegalStateException, InvalidRequestException, ChannelErrorException, RecordNotFoundException
java.lang.IllegalStateException
- A Channel name has not been set.ChannelErrorException
- A problem locating the channel occured.InvalidRequestException
- The delete method can only be used in a requester.RecordNotFoundException
- The addressing context could not be located.public java.lang.String getChannel()
setChannel
,
it does not return the default channel name set by the pipeline.public void setChannel(java.lang.String channel)
channel
- The channel name to use to locate the addressing contecxt.public java.lang.String getNationalLang()
public void setNationalLang(java.lang.String natlang)
natlang
- The national language to use to build the addressing contects.public java.lang.String getAction(int contextType) throws java.lang.IllegalArgumentException, InvalidRequestException, CCSIDErrorException, RecordNotFoundException, ChannelErrorException
contextType
- The cvda context type. e.g. WSAContext.REQCONTEXT.java.lang.IllegalArgumentException
- The contextType is not valid.ChannelErrorException
- A problem locating the channel occured.CCSIDErrorException
- An exception occurred translating character sets.InvalidRequestException
- A problem exists with the request data.RecordNotFoundException
- The addressing context could not be located.public void setAction(java.lang.String action) throws InvalidRequestException, CCSIDErrorException, ChannelErrorException
action
- The action MAP to set.ChannelErrorException
- A problem locating the channel occured.CCSIDErrorException
- An exception occurred translating character sets.InvalidRequestException
- A problem exists with the request data.public java.lang.String getMessageId(int contextType) throws java.lang.IllegalArgumentException, InvalidRequestException, CCSIDErrorException, RecordNotFoundException, ChannelErrorException
contextType
- The cvda context type. e.g. WSAContext.REQCONTEXT.java.lang.IllegalArgumentException
- The contextType is not valid.ChannelErrorException
- A problem locating the channel occured.CCSIDErrorException
- An exception occurred translating character sets.InvalidRequestException
- A problem exists with the request data.RecordNotFoundException
- The addressing context could not be located.public void setMessageId(java.lang.String messageId) throws InvalidRequestException, CCSIDErrorException, ChannelErrorException
messageId
- The messageId MAP to set.ChannelErrorException
- A problem locating the channel occured.CCSIDErrorException
- An exception occurred translating character sets.InvalidRequestException
- A problem exists with the request data.public java.util.Map<java.lang.String,java.lang.String> getRelatesTo(int contextType) throws java.lang.IllegalArgumentException, InvalidRequestException, CCSIDErrorException, RecordNotFoundException, ChannelErrorException
contextType
- The cvda context type. e.g. WSAContext.REQCONTEXT.java.lang.IllegalArgumentException
- The contextType is not valid.ChannelErrorException
- A problem locating the channel occured.CCSIDErrorException
- An exception occurred translating character sets.InvalidRequestException
- A problem exists with the request data.RecordNotFoundException
- The addressing context could not be located.public void setRelatesTo(java.lang.String relatesURI, java.lang.String relatesType) throws InvalidRequestException, CCSIDErrorException, ChannelErrorException
relatesURI
- The messageId URI of the related message to set.relatesType
- The type of relationship with the related message.ChannelErrorException
- A problem locating the channel occured.CCSIDErrorException
- An exception occurred translating character sets.InvalidRequestException
- A problem exists with the request data.public void setRelatesTo(java.lang.String relatesURI) throws InvalidRequestException, CCSIDErrorException, ChannelErrorException
relatesURI
- The messageId URI of the related message to set.ChannelErrorException
- A problem locating the channel occured.CCSIDErrorException
- An exception occurred translating character sets.InvalidRequestException
- A problem exists with the request data.public java.lang.String getEprAddress(int contextType, int eprType) throws java.lang.IllegalArgumentException, InvalidRequestException, CCSIDErrorException, RecordNotFoundException, ChannelErrorException
contextType
- The cvda context type. e.g. WSAContext.REQCONTEXT.eprType
- The cvda EPR type of the EPR to set in the context.
e.g. WSAContext.TOEPR.java.lang.IllegalArgumentException
- The contextType or eprType is not valid.ChannelErrorException
- A problem locating the channel occured.CCSIDErrorException
- An exception occurred translating character sets.InvalidRequestException
- A problem exists with the request data.RecordNotFoundException
- The addressing context could not be located.public void setEprAddress(int eprType, java.lang.String address) throws java.lang.IllegalArgumentException, InvalidRequestException, CCSIDErrorException, ChannelErrorException
eprType
- The cvda EPR type of the EPR to set in the context.
e.g. WSAContext.TOEPR.address
- The address URI to set in the specified EPR.java.lang.IllegalArgumentException
- The eprType is not valid.ChannelErrorException
- A problem locating the channel occured.CCSIDErrorException
- An exception occurred translating character sets.InvalidRequestException
- A problem exists with the request data.public java.lang.String getEprRefParms(int contextType, int eprType) throws java.lang.IllegalArgumentException, InvalidRequestException, CCSIDErrorException, RecordNotFoundException, ChannelErrorException
contextType
- The cvda context type. e.g. WSAContext.REQCONTEXT.eprType
- The cvda EPR type of the EPR to set in the context.
e.g. WSAContext.TOEPR.java.lang.IllegalArgumentException
- The contextType or eprType is not valid.ChannelErrorException
- A problem locating the channel occured.CCSIDErrorException
- An exception occurred translating character sets.InvalidRequestException
- A problem exists with the request data.RecordNotFoundException
- The addressing context could not be located.public void setEprRefParms(int eprType, java.lang.String refparms) throws java.lang.IllegalArgumentException, InvalidRequestException, CCSIDErrorException, ChannelErrorException
eprType
- The cvda EPR type of the EPR to set in the context.
e.g. WSAContext.TOEPR.refparms
- The reference parameter xml to set in the specified EPR.java.lang.IllegalArgumentException
- The eprType is not valid.ChannelErrorException
- A problem locating the channel occured.CCSIDErrorException
- An exception occurred translating character sets.InvalidRequestException
- A problem exists with the request data.public java.lang.String getEprMetadata(int contextType, int eprType) throws java.lang.IllegalArgumentException, InvalidRequestException, CCSIDErrorException, RecordNotFoundException, ChannelErrorException
contextType
- The cvda context type. e.g. WSAContext.REQCONTEXT.eprType
- The cvda EPR type of the EPR to set in the context.
e.g. WSAContext.TOEPR.java.lang.IllegalArgumentException
- The contextType or eprType is not valid.ChannelErrorException
- A problem locating the channel occured.CCSIDErrorException
- An exception occurred translating character sets.InvalidRequestException
- A problem exists with the request data.RecordNotFoundException
- The addressing context could not be located.public void setEprMetadata(int eprType, java.lang.String metadata) throws java.lang.IllegalArgumentException, InvalidRequestException, CCSIDErrorException, ChannelErrorException
eprType
- The cvda EPR type of the EPR to set in the context.
e.g. WSAContext.TOEPR.metadata
- The metadata xml to set in the specified EPR.java.lang.IllegalArgumentException
- The eprType is not valid.ChannelErrorException
- A problem locating the channel occured.CCSIDErrorException
- An exception occurred translating character sets.InvalidRequestException
- A problem exists with the request data.public java.lang.String getEpr(int contextType, int eprType) throws java.lang.IllegalArgumentException, InvalidRequestException, CCSIDErrorException, RecordNotFoundException, ChannelErrorException
contextType
- The cvda context type. e.g. WSAContext.REQCONTEXT.eprType
- The cvda EPR type of the EPR to set in the context.
e.g. WSAContext.TOEPR.java.lang.IllegalArgumentException
- The contextType or eprType is not valid.ChannelErrorException
- A problem locating the channel occured.CCSIDErrorException
- An exception occurred translating character sets.InvalidRequestException
- A problem exists with the request data.RecordNotFoundException
- The addressing context could not be located.public void setEpr(int eprType, java.lang.String epr) throws java.lang.IllegalArgumentException, InvalidRequestException, CCSIDErrorException, ChannelErrorException
eprType
- The cvda EPR type of the EPR to set in the context.
e.g. WSAContext.TOEPR.epr
- The epr xml to set in the specified EPR.java.lang.IllegalArgumentException
- The eprType is not valid.ChannelErrorException
- A problem locating the channel occured.CCSIDErrorException
- An exception occurred translating character sets.InvalidRequestException
- A problem exists with the request data.