| |
|
| org.apache.axis2.context.SelfManagedDataManager
SelfManagedDataManager | public interface SelfManagedDataManager (Code) | | An interface for use by a message handler to allow
it to save and restore any message-specific data.
A handler can have message-specific data that
needs to be associated the message being processed.
The handler can keep this message-specific data
in the Messagecontext object by adding the
data to the user data table via the
MessageContext method. When the MessageContext
object is saved (for example, to persistent storage),
and restored, this interface SelfManagedDataManager
provides a way for the handler to save and restore
the handler's message-specific data.
See Also: MessageContext |
deserializeSelfManagedData | public void deserializeSelfManagedData(ByteArrayInputStream data, MessageContext mc) throws IOException(Code) | | This method is invoked when the MessageContext object is being restored.
Implementors will receive the data they had previously saved in the
serializeSelfManagedData() method. Implementors are responsible for
reconstituting their message-specific data.
Parameters: data - ByteArrayInputStream consisting of the data that this handler had previously saved Parameters: mc - the MessageContext object being restored throws: IOException - |
restoreTransientData | public void restoreTransientData(MessageContext mc)(Code) | | This method is invoked when the MessageContext object is being restored and
after the deserializeSelfManagedData() method.
Implementors use this method to re-establish transient message-specific data,
particularly if the implementor did not save any user data in the
serializeSelfManagedData() method.
Parameters: mc - the MessageContext object being restored |
serializeSelfManagedData | public ByteArrayOutputStream serializeSelfManagedData(MessageContext mc) throws IOException(Code) | | This method is invoked when the MessageContext object is being saved.
Implementors are expected to iterate through the data objects they wish
to save and return it in a ByteArrayOutputStream. This data will
later be passed to the implementor's deserializeSelfManagedData method when
the data object is to be restored.
The data being saved may be the data stored by the implementor
in the MessageContext object's SelfManagedData list and may include
additional information such as the implementor's fields.
Note that data stored by the implementor in the MessageContext object's SelfManagedData
list is retrievable by calling the MessageContext.getSelfManagedData() method
for EACH key/value pair.
Parameters: mc - the MessageContext that is being saved The saved data in the output stream. Note that theformat of the data in the output stream is definedby the implementor. throws: IOException - |
|
|
|