Overview | Package | Class | Tree | Deprecated | Index | Help
| Spring Web Flow
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.springframework.binding.message
Interface StateManageableMessageContext

All Superinterfaces:
  MessageContext

All Known Implementing Classes:
  DefaultMessageContext

    public interface StateManageableMessageContext

extends MessageContext

A message context whose internal state can be managed by an external care-taker. State management employs the GOF Memento pattern. This context can produce a serializable memento representing its internal state at any time. A care-taker can then use that memento at a later time to restore any context instance to a previous state.

Author:
  Keith Donald

Method Summary
`java.io.Serializable` | `createMessagesMemento()` Create a serializable memento, or token representing a snapshot of the internal state of this message context.
`void` | `restoreMessages(java.io.Serializable messagesMemento)` Set the state of this context from the memento provided.
`void` | `setMessageSource(org.springframework.context.MessageSource messageSource)` Configure the message source used to resolve messages added to this context.

Methods inherited from interface org.springframework.binding.message.MessageContext
`addMessage, clearMessages, getAllMessages, getMessagesByCriteria, getMessagesBySource, hasErrorMessages`

Method Detail

### createMessagesMemento

    java.io.Serializable createMessagesMemento()

  Create a serializable memento, or token representing a snapshot of the internal state of this message context.

  Returns:
    the messages memento

### restoreMessages

    void restoreMessages(java.io.Serializable messagesMemento)

  Set the state of this context from the memento provided. After this call, the messages in this context will match what is encapsulated inside the memento. Any previous state will be overridden.

  Parameters:
    `messagesMemento` - the messages memento

### setMessageSource

    void setMessageSource(org.springframework.context.MessageSource messageSource)

  Configure the message source used to resolve messages added to this context. May be set at any time to change how coded messages are resolved.

  Parameters:
    `messageSource` - the message source
  See Also:
    `MessageContext.addMessage(MessageResolver)`

Overview | Package | Class | Tree | Deprecated | Index | Help
| Spring Web Flow
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD