Fido Alpha 3.2

fido.frontend
Class FidoMessageWriter

java.lang.Object
  |
  +--fido.frontend.FidoMessageWriter

public class FidoMessageWriter
extends java.lang.Object

Fido server code can either be accessed by a client program or through an HTML interface. This class stores the Writer the FidoSession class uses to communicate with the client.

See Also:
FidoSession

Constructor Summary
FidoMessageWriter(java.io.PrintWriter out)
          Creates a new FidoMessageWriter instance with a given PrintWriter that is used to send information back to the client.
FidoMessageWriter(java.io.PrintWriter out, java.lang.String context)
          Creates a new FidoMessageWriter instance with a given PrintWriter and Html context path.
 
Method Summary
 java.lang.String getHtmlContext()
          Returns the HTML context for the client.
 java.io.PrintWriter getWriter()
          Returns the PrintWriter for communicating with the client.
 boolean isHtmlFrontEnd()
          Returns whether the client accessed the server via HTML.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FidoMessageWriter

public FidoMessageWriter(java.io.PrintWriter out,
                         java.lang.String context)
Creates a new FidoMessageWriter instance with a given PrintWriter and Html context path. The PrintWriter is used to send information back to the client. The context path is the path in the URL the client used to access the servlet.

Parameters:
out - PrintWriter used to send info back to the client.
context - Html context path.

FidoMessageWriter

public FidoMessageWriter(java.io.PrintWriter out)
Creates a new FidoMessageWriter instance with a given PrintWriter that is used to send information back to the client. This constructor should be used by non-html clients.

Parameters:
out - PrintWriter used to send info back to the client.
Method Detail

isHtmlFrontEnd

public boolean isHtmlFrontEnd()
Returns whether the client accessed the server via HTML. All communication with the client should send HTML.

Returns:
True if the client is expecting HTML. False otherwise.

getHtmlContext

public java.lang.String getHtmlContext()
Returns the HTML context for the client. The HTML context is the path of the URL the client used to access the servlet. The context is used to access the FidoHelp servlet.

Returns:
The HTML context path.

getWriter

public java.io.PrintWriter getWriter()
Returns the PrintWriter for communicating with the client.

Returns:
The PrintWriter for the FidoSession.

Fido Alpha 3.2