fr.gedeon.telnetservice
Interface OutputFormat

All Known Subinterfaces:
OutputFormatSpi
All Known Implementing Classes:
OutputFormatDefaultImpl, OutputFormatVelocityImpl, OutputFormatVT100Impl

public interface OutputFormat

The OutputFormat interface is used by extensions and integration modules. It represents the View part of an MVC setup where the Actionlisteners are the Controller, and the Model is held by the integrating classes.

Author:
wgedeon@gmail.com

Method Summary
 String format(SessionState sessionState, Object subject)
          Format the given subject for output based on rules that are implementation specific.
 String format(SessionState sessionState, Object subject, String indent)
          Format the given subject for output based on rules that are implementation specific.
 StringBuffer format(SessionState sessionState, StringBuffer buffer, Object subject)
          Format the given subject for output based on rules that are implementation specific.
This version of the signature allows the caller to provide a buffer for this output format implementation to append to.
 StringBuffer format(SessionState sessionState, StringBuffer buffer, Object subject, String indent)
          Format the given subject for output based on rules that are implementation specific.
This version of the signature allows the caller to provide a buffer for this output format implementation to append to.
 

Method Detail

format

String format(SessionState sessionState,
              Object subject)
              throws OutputFormatException
Format the given subject for output based on rules that are implementation specific.

Parameters:
sessionState - the current session state
subject - the subject to be represented
Returns:
a string that represents the output in the context of this output format
Throws:
OutputFormatException - for any errors that occur in the formatting process.

format

String format(SessionState sessionState,
              Object subject,
              String indent)
              throws OutputFormatException
Format the given subject for output based on rules that are implementation specific.

Parameters:
sessionState - the current session state
subject - the subject to be represented
indent - a hint to the indent expected by the caller at the beginning of each line.
Returns:
a string that represents the output in the context of this output format
Throws:
OutputFormatException - for any errors that occur in the formatting process.

format

StringBuffer format(SessionState sessionState,
                    StringBuffer buffer,
                    Object subject)
                    throws OutputFormatException
Format the given subject for output based on rules that are implementation specific.
This version of the signature allows the caller to provide a buffer for this output format implementation to append to.

Parameters:
sessionState - the current session state
buffer - the caller's current buffer
subject - the subject to be represented
Returns:
the provided buffer updated with the subject's representation
Throws:
OutputFormatException - for any errors that occur in the formatting process.

format

StringBuffer format(SessionState sessionState,
                    StringBuffer buffer,
                    Object subject,
                    String indent)
                    throws OutputFormatException
Format the given subject for output based on rules that are implementation specific.
This version of the signature allows the caller to provide a buffer for this output format implementation to append to.

Parameters:
sessionState - the current session state
buffer - the caller's current buffer
subject - the subject to be represented
indent - a hint to the indent expected by the caller at the beginning of each line.
Returns:
the provided buffer updated with the subject's representation
Throws:
OutputFormatException - for any errors that occur in the formatting process.


Copyright © 2008. All Rights Reserved.