fr.gedeon.telnetservice
Interface PromptDecorator

All Known Implementing Classes:
PromptDecoratorDefaultImpl

public interface PromptDecorator

Classes implementing this interface can be provided by a TelnetServiceExtension for contribution in the construction of the user console prompt.

Author:
wgedeon@gmail.com

Method Summary
 boolean decoratePrompt(SessionState sessionState, Prompt prompt)
          The prompt construction is done incrementally by calling the registered decorators in a sequence determined by their priority (given by the serving extension) relative to the other decorators' priorities.
The provided prompt is initialized and may already contain content from higher priority decorators.
 void initialize(SessionState sessionState)
          Is called at session creation to allow for the decorator to initialize state.
Note: It is recommended that decorators be stateless, and all state be stored in the session state.
 

Method Detail

initialize

void initialize(SessionState sessionState)
                throws PromptDecoratorInitializationException
Is called at session creation to allow for the decorator to initialize state.
Note: It is recommended that decorators be stateless, and all state be stored in the session state.

Parameters:
sessionState - the current session state. At this point the state will not have been set to active yet. This will be done after all initialization is done.
Throws:
PromptDecoratorInitializationException

decoratePrompt

boolean decoratePrompt(SessionState sessionState,
                       Prompt prompt)
The prompt construction is done incrementally by calling the registered decorators in a sequence determined by their priority (given by the serving extension) relative to the other decorators' priorities.
The provided prompt is initialized and may already contain content from higher priority decorators. It is important

Parameters:
sessionState - the session state
Returns:
true to allow lesser priority decorators to decorate the prompt.


Copyright © 2008. All Rights Reserved.