|
||||||||||
PREV CLASS (src) NEXT CLASS (src) | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jboss.axis.MessageContext
A MessageContext is the Axis implementation of the javax SOAPMessageContext class, and is core to message processing in handlers and other parts of the system.
This class also contains constants for accessing some well-known properties. Using a hierarchical namespace is strongly suggested in order to lower the chance for conflicts. (These constants should be viewed as an explicit list of well known and widely used context keys, there's nothing wrong with directly using the key strings. This is the reason for the hierarchical constant namespace. Actually I think we might just list the keys in the docs and provide no such constants since they create yet another namespace, but we'd have no compile-time checks then. Whaddya think? - todo by Jacek)
Field Summary | |
static java.lang.String |
ACCEPTMISSINGPARAMS
A boolean param, to control whether we accept missing parameters as nulls or refuse to acknowledge them. |
static java.lang.String |
ATTACHMENTS_DIR
The directory where in coming attachments are created. |
static java.lang.String |
AUTHUSER
Place to store an AuthenticatedUser |
static java.lang.String |
CALL
If on the client - this is the Call object |
static java.lang.String |
ENGINE_HANDLER
Contains an instance of Handler, which is the ServiceContext and the entrypoint of this service. |
static java.lang.String |
HTTP_TRANSPORT_VERSION
The value of the property is used by service WSDL generation (aka ?WSDL) Set this property to request a certain level of HTTP. |
static java.lang.String |
IS_MSG
Are we doing Msg vs RPC? - For Java Binding |
static java.lang.String |
QUIT_REQUESTED
Has a quit been requested? Hackish... |
static java.lang.String |
SECURITY_PROVIDER
|
protected static java.lang.String |
systemTempDir
temporary directory to store attachments |
static java.lang.String |
TRANS_URL
This String is the URL that the message came to |
static java.lang.String |
WSDLGEN_INTFNAMESPACE
The value of the property is used by service WSDL generation (aka ?WSDL) For the service's interface namespace if not set TRANS_URL property is used. |
static java.lang.String |
WSDLGEN_RESOURCE
The value of the property is used by service WSDL generation (aka ?WSDL) If the wsdl documnet contains imports, this property is the relative path to the imported artifact. |
static java.lang.String |
WSDLGEN_SERV_LOC_URL
The value of the property is used by service WSDL generation (aka ?WSDL) For the service's location if not set TRANS_URL property is used. |
Constructor Summary | |
MessageContext(AxisEngine (src) engine)
Create a message context. |
Method Summary | |
boolean |
containsProperty(java.lang.String name)
Returns true if the MessageContext contains a property with the specified name. |
AxisEngine (src) |
getAxisEngine()
get the axis engine. |
java.lang.ClassLoader |
getClassLoader()
get the classloader, implicitly binding to the thread context classloader if an override has not been supplied |
static MessageContext (src) |
getCurrentContext()
Get the active message context. |
Message (src) |
getCurrentMessage()
Return the current (i.e. |
java.lang.String |
getEncodingStyle()
Returns the encoding style as a URI that should be used for the SOAP message. |
boolean |
getMaintainSession()
Are we maintaining session state? |
SOAPMessage (src) |
getMessage()
Gets the SOAPMessage from this message context |
OperationDesc (src) |
getOperation()
the current operation |
OperationDesc (src) |
getOperationByQName(QName (src) qname)
get the first possible operation that could match a body containing an element of the given QName. |
Style (src) |
getOperationStyle()
Get the operation style. |
Use (src) |
getOperationUse()
Get the operation use. |
java.lang.String |
getPassword()
Get the password |
boolean |
getPastPivot()
Determine when we've passed the pivot |
OperationDesc (src) [] |
getPossibleOperationsByQName(QName (src) qname)
getPossibleOperationsByQName Returns a list of operation descriptors that could may possibly match a body containing an element of the given QName. |
java.lang.Object |
getProperty(java.lang.String name)
Returns the value associated with the named property - or null if not defined/set. |
java.util.Iterator |
getPropertyNames()
Returns an Iterator view of the names of the properties in this MessageContext |
Message (src) |
getRequestMessage()
Get the request message. |
Message (src) |
getResponseMessage()
Get the response message. |
java.lang.String[] |
getRoles()
Not (yet) implemented method in the SOAPMessageContext interface Gets the SOAP actor roles associated with an execution of the HandlerChain and its contained Handler instances. |
SchemaVersion (src) |
getSchemaVersion()
Schema version information |
SOAPService (src) |
getService()
|
Session (src) |
getSession()
Sessions |
java.lang.String |
getSOAPActionURI()
Get the soapAction URI. |
SOAPConstants (src) |
getSOAPConstants()
SOAP constants |
java.lang.String |
getStrProp(java.lang.String propName)
Just a util so we don't have to cast the result |
java.lang.String |
getTargetService()
|
int |
getTimeout()
Get timeout from our MessageContext. |
java.lang.String |
getTransportName()
Transport |
TypeMapping (src) |
getTypeMapping()
Return the type mapping currently in scope for our encoding style |
TypeMappingRegistry (src) |
getTypeMappingRegistry()
Get the currently in-scope type mapping registry. |
java.lang.String |
getUsername()
Get the user name |
boolean |
isClient()
Let us know whether this is the client or the server. |
boolean |
isEncoded()
Encoding |
boolean |
isHighFidelity()
|
boolean |
isPropertyTrue(java.lang.String propName)
Tests to see if the named property is set in the 'bag'. |
boolean |
isPropertyTrue(java.lang.String propName,
boolean defaultVal)
Tests to see if the named property is set in the 'bag'. |
void |
removeProperty(java.lang.String propName)
Removes a property (name-value pair) from the MessageContext |
void |
reset()
|
void |
setClassLoader(java.lang.ClassLoader cl)
set a new classloader |
void |
setCurrentMessage(Message (src) curMsg)
Set the current (i.e. |
void |
setEncodingStyle(java.lang.String namespaceURI)
Sets the encoding style to the URI passed in. |
void |
setHighFidelity(boolean highFidelity)
|
void |
setMaintainSession(boolean yesno)
Set whether we are maintaining session state |
void |
setMessage(SOAPMessage (src) message)
Sets the SOAPMessage for this message context |
void |
setOperation(OperationDesc (src) operation)
set the current operation |
void |
setPassword(java.lang.String password)
Set the password. |
void |
setPastPivot(boolean pastPivot)
Indicate when we've passed the pivot |
void |
setProperty(java.lang.String name,
java.lang.Object value)
Allows you to set a named property to the passed in value. |
void |
setPropertyParent(java.util.Hashtable parent)
|
void |
setRequestMessage(Message (src) reqMsg)
Set the request message, and make sure that message is associated with this MessageContext. |
void |
setResponseMessage(Message (src) respMsg)
Set the response message, and make sure that message is associated with this MessageContext. |
void |
setSchemaVersion(SchemaVersion (src) schemaVersion)
|
void |
setService(SOAPService (src) sh)
|
void |
setSession(Session (src) session)
|
void |
setSOAPActionURI(java.lang.String SOAPActionURI)
Set the soapAction URI. |
void |
setSOAPConstants(SOAPConstants (src) soapConstants)
|
void |
setTargetService(java.lang.String tServ)
Set the target service for this message. |
void |
setTimeout(int value)
Set timeout in our MessageContext. |
void |
setTransportName(java.lang.String transportName)
|
void |
setTypeMappingRegistry(TypeMappingRegistry (src) reg)
replace the engine's type mapping registry with a local one |
void |
setUsername(java.lang.String username)
Set the username. |
void |
setUseSOAPAction(boolean useSOAPAction)
Should soapAction be used? |
boolean |
useSOAPAction()
Are we using soapAction? |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected static java.lang.String systemTempDir
public static final java.lang.String ENGINE_HANDLER
public static final java.lang.String TRANS_URL
public static final java.lang.String QUIT_REQUESTED
public static final java.lang.String AUTHUSER
public static final java.lang.String CALL
public static final java.lang.String IS_MSG
public static final java.lang.String ATTACHMENTS_DIR
public static final java.lang.String ACCEPTMISSINGPARAMS
public static final java.lang.String WSDLGEN_INTFNAMESPACE
public static final java.lang.String WSDLGEN_SERV_LOC_URL
public static final java.lang.String WSDLGEN_RESOURCE
public static final java.lang.String HTTP_TRANSPORT_VERSION
public static final java.lang.String SECURITY_PROVIDER
Constructor Detail |
public MessageContext(AxisEngine (src) engine)
engine
- the controlling axis engine. Null is actually accepted here,
though passing a null engine in is strongly discouraged as many of the methods
assume that it is in fact defined.Method Detail |
public OperationDesc (src) getOperation()
public void setOperation(OperationDesc (src) operation)
operation
- public OperationDesc (src) [] getPossibleOperationsByQName(QName (src) qname) throws AxisFault (src)
qname
- of the first element in the body
AxisFault (src)
public OperationDesc (src) getOperationByQName(QName (src) qname) throws AxisFault (src)
qname
- name of the message body
AxisFault (src)
public static MessageContext (src) getCurrentContext()
public void setTypeMappingRegistry(TypeMappingRegistry (src) reg)
reg
- public TypeMappingRegistry (src) getTypeMappingRegistry()
public TypeMapping (src) getTypeMapping()
public java.lang.String getTransportName()
public void setTransportName(java.lang.String transportName)
public SOAPConstants (src) getSOAPConstants()
public void setSOAPConstants(SOAPConstants (src) soapConstants)
public SchemaVersion (src) getSchemaVersion()
public void setSchemaVersion(SchemaVersion (src) schemaVersion)
public Session (src) getSession()
public void setSession(Session (src) session)
public boolean isEncoded()
public void setMaintainSession(boolean yesno)
yesno
- flag to set to true to maintain sessionspublic boolean getMaintainSession()
public Message (src) getRequestMessage()
public void setRequestMessage(Message (src) reqMsg)
reqMsg
- the new request Message.public Message (src) getResponseMessage()
public void setResponseMessage(Message (src) respMsg)
respMsg
- the new response Message.public Message (src) getCurrentMessage()
public SOAPMessage (src) getMessage()
getMessage
in interface SOAPMessageContext (src)
public void setCurrentMessage(Message (src) curMsg)
public void setMessage(SOAPMessage (src) message)
setMessage
in interface SOAPMessageContext (src)
message
- Request SOAP message
java.lang.UnsupportedOperationException
- If this
operation is not supportedpublic boolean getPastPivot()
public void setPastPivot(boolean pastPivot)
public void setTimeout(int value)
value
- the maximum amount of time, in millisecondspublic int getTimeout()
public java.lang.ClassLoader getClassLoader()
public void setClassLoader(java.lang.ClassLoader cl)
cl
- public java.lang.String getTargetService()
public AxisEngine (src) getAxisEngine()
public void setTargetService(java.lang.String tServ) throws AxisFault (src)
tServ
- the name of the target service.
AxisFault (src)
public SOAPService (src) getService()
public void setService(SOAPService (src) sh) throws AxisFault (src)
AxisFault (src)
public boolean isClient()
public java.lang.String getStrProp(java.lang.String propName)
public boolean isPropertyTrue(java.lang.String propName)
public boolean isPropertyTrue(java.lang.String propName, boolean defaultVal)
public void setProperty(java.lang.String name, java.lang.Object value)
setProperty
in interface MessageContext (src)
name
- Name of the propertyvalue
- Value of the propertypublic boolean containsProperty(java.lang.String name)
containsProperty
in interface MessageContext (src)
name
- Name of the property whose presense is to be tested
public java.util.Iterator getPropertyNames()
getPropertyNames
in interface MessageContext (src)
public java.lang.Object getProperty(java.lang.String name)
getProperty
in interface MessageContext (src)
name
- Name of the property whose value is to be retrieved
public void setPropertyParent(java.util.Hashtable parent)
public void setUsername(java.lang.String username)
public java.lang.String getUsername()
public void setPassword(java.lang.String password)
public java.lang.String getPassword()
public Style (src) getOperationStyle()
public Use (src) getOperationUse()
public void setUseSOAPAction(boolean useSOAPAction)
public boolean useSOAPAction()
public void setSOAPActionURI(java.lang.String SOAPActionURI) throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException
public java.lang.String getSOAPActionURI()
public void setEncodingStyle(java.lang.String namespaceURI)
namespaceURI
- URI of the encoding to use.public java.lang.String getEncodingStyle()
public void removeProperty(java.lang.String propName)
MessageContext (src)
removeProperty
in interface MessageContext (src)
propName
- Name of the property to be removedpublic void reset()
public boolean isHighFidelity()
public void setHighFidelity(boolean highFidelity)
public java.lang.String[] getRoles()
getRoles
in interface SOAPMessageContext (src)
HandlerChain.setRoles(java.lang.String[])
,
HandlerChain.getRoles()
|
||||||||||
PREV CLASS (src) NEXT CLASS (src) | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |