fr.gedeon.telnetservice
Class PromptDecoratorDefaultImpl

java.lang.Object
  extended by fr.gedeon.telnetservice.PromptDecoratorDefaultImpl
All Implemented Interfaces:
PromptDecorator

public class PromptDecoratorDefaultImpl
extends Object
implements PromptDecorator

The default prompt decorator implementation, decorates the prompt by appending "> ".

Author:
wgedeon@gmail.com

Constructor Summary
PromptDecoratorDefaultImpl()
           
 
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PromptDecoratorDefaultImpl

public PromptDecoratorDefaultImpl()
Method Detail

initialize

public void initialize(SessionState sessionState)
                throws PromptDecoratorInitializationException
Description copied from interface: PromptDecorator
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.

Specified by:
initialize in interface PromptDecorator
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

public boolean decoratePrompt(SessionState sessionState,
                              Prompt prompt)
Description copied from interface: PromptDecorator
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

Specified by:
decoratePrompt in interface PromptDecorator
Parameters:
sessionState - the session state
Returns:
true to allow lesser priority decorators to decorate the prompt.


Copyright © 2008. All Rights Reserved.