|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface TelnetServiceExtension
The ServiceExtension
is the entry point for customizing the service.
A service extension has 2 purposes:
ActionListener
s, and specifies their priority in receiving
action events, andPromptDecorator
s, and specifies the order in which they
are invoked to construct the console prompt
Method Summary | |
---|---|
Integer |
getActionDistributionPriority()
The event distribution priority determines the order in which the listeners will receive an event, when there are more than one listener registered. |
ActionListener |
getActionListener()
Serve an instance of the ActionListener implemented by this service extension.Although it is recommended that the Action Listener implementation be stateless (with all state stored in the SessionState ), it is left to the implementing party to decide
whether to serve a singleton, an instance from a managed pool or a new instance at each call.This method will be called once per session, at session construction time, following the order described in the package documentation. |
String |
getDescription()
An optional short description of this service extension. |
String |
getName()
The name of this service extension. |
OutputFormatSpi[] |
getOutputFormats()
Provide the OutpuFormat s that are provided by this extension. |
PromptDecorator |
getPromptDecorator()
Serve an instance of the ActionListener implemented by this service extension.Although it is recommended that the Action Listener implementation be stateless (with all state stored in the SessionState ), it is left to the implementing party to decide
whether to serve a singleton, an instance from a managed pool or a new instance at each call.This method will be called once per session, at session construction time, following the order described in the package documentation. |
Integer |
getPromptDecoratorPriority()
The prompt decoration priority determines the order in which the decorators will be called to participate in the prompt construction, when there are more than one decorator registered. The priority is from smallest to largest. Note that depending on the return value of the calls to the PromptDecorator.decoratePrompt(SessionState, Prompt) method in a
decorator will determine whether the next decorator in the list will be called at all --
some decorators with high priority may block lesser priority decorators from other subsequent
prompt modification. |
boolean |
providesActionListener()
This method will be checked before a call to getActionListener() or
getActionDistributionPriority() is made. |
boolean |
providesOutputFormats()
This method will be checked before calls to getOutputFormats() , which will be called
if the returned value is true |
boolean |
providesPromptDecorator()
This method will be checked before a call to getPromptDecorator() or
getPromptDecoratorPriority() is made. |
Method Detail |
---|
String getName()
String getDescription()
null
if no description is available.boolean providesActionListener()
getActionListener()
or
getActionDistributionPriority()
is made.
true
if this service extension provides an implementation to the
ActionListener
interface, false
otherwise.ActionListener getActionListener() throws ActionListenerCreateException
ActionListener
implemented by this service extension.SessionState
), it is left to the implementing party to decide
whether to serve a singleton, an instance from a managed pool or a new instance at each call.
ActionListenerCreateException
- if there are errors providing the listener instance.Integer getActionDistributionPriority()
handle*
methods in the
listener will determine whether the next listener in the list will receive the event at all --
some listeners with high priority may block the event from other subsequent listeners, this
is especially the case for authentication check before access, etc.
boolean providesPromptDecorator()
getPromptDecorator()
or
getPromptDecoratorPriority()
is made.
true
if this service extension provides an implementation to the
PromptDecorator
interface, false
otherwise.PromptDecorator getPromptDecorator() throws PromptDecoratorCreateException
ActionListener
implemented by this service extension.SessionState
), it is left to the implementing party to decide
whether to serve a singleton, an instance from a managed pool or a new instance at each call.
ActionListenerCreateException
- if there are errors providing the listener instance.
PromptDecoratorCreateException
Integer getPromptDecoratorPriority()
PromptDecorator.decoratePrompt(SessionState, Prompt)
method in a
decorator will determine whether the next decorator in the list will be called at all --
some decorators with high priority may block lesser priority decorators from other subsequent
prompt modification.
boolean providesOutputFormats()
getOutputFormats()
, which will be called
if the returned value is true
true
if this extension provides one or more OutputFormat
implementations, false
otherwise.OutputFormatSpi[] getOutputFormats()
OutpuFormat
s that are provided by this extension. The returned
items will be injected into the pool of output formats and ordered by their priority.
OutputFormat
s
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |