|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.sape.smfw.messagingengine.MessageContext
The MessageContext stores the configuration of the messaging engine as well as the processing state of a message.
Field Summary | |
static String |
HTTP_SERVLET_REQUEST_PROPERTY_NAME
Property name of the HttpServletRequest object stored in the MessageContext |
private MessageHandlerFactory |
messageHandlerFactory
The MessageHandlerFactory for this context |
private Map |
properties
A map to store properties related to this context |
private User |
user
The user who sent the request |
Constructor Summary | |
MessageContext(MessageHandlerFactory messageHandlerFactory)
Constructs a MessageContext |
Method Summary | |
void |
addProperty(String name,
Object value)
Adds a property to the context. |
MessageHandler |
createMessageHandler(Message message)
Convenience method to create a MessageHandler for the supplied message. |
MessageHandlerFactory |
getMessageHandlerFactory()
Returns the MessageHandlerFactory for this context |
Map |
getProperties()
Get the properties associated with this context |
Object |
getProperty(String name)
Gets a property from the context. |
User |
getUser()
Returns the User who sent the request |
Object |
removeProperty(String name)
Removes a property to the context. |
void |
setMessageHandlerFactory(MessageHandlerFactory messageHandlerFactory)
Sets the MessageHandlerFactory for this context |
void |
setProperties(Map properties)
Set the properties associated with this context |
void |
setUser(User user)
Sets the User who sent the request |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final String HTTP_SERVLET_REQUEST_PROPERTY_NAME
private MessageHandlerFactory messageHandlerFactory
private User user
private Map properties
Constructor Detail |
public MessageContext(MessageHandlerFactory messageHandlerFactory)
messageHandlerFactory
- the MessageHandlerFactory for this contextMethod Detail |
public MessageHandlerFactory getMessageHandlerFactory()
public void setMessageHandlerFactory(MessageHandlerFactory messageHandlerFactory)
messageHandlerFactory
- the MessageHandlerFactory for this contextpublic MessageHandler createMessageHandler(Message message)
message
- the message for which a MessageHandler is neededpublic User getUser()
public void setUser(User user)
user
- the User who sent the requestpublic Map getProperties()
public void setProperties(Map properties)
properties
- the properties to setpublic void addProperty(String name, Object value)
name
- name of the property to be addedvalue
- value of the property to be addedpublic Object removeProperty(String name)
name
- name of the property to be removed
public Object getProperty(String name)
name
- name of the property that is needed
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |