com.sptci.echo2
Class ServerDelayMessage

java.lang.Object
  extended by nextapp.echo2.webrender.ServerDelayMessage
      extended by com.sptci.echo2.ServerDelayMessage
All Implemented Interfaces:
Serializable

public class ServerDelayMessage
extends ServerDelayMessage

Representation of a client/server-interaction delay message. Client/server-interaction delay messages are presented to the user while the client is communicating synchronously with the server.

Note: This class expects the server delay message to be specified in a wait.xml (or its localised equivalents) file under the META-INF/resource/localisation directory in the jar file, since this is the standard location used for all localisation files.

© Copyright 2007 Sans Pareil Technologies, Inc.

Version:
$Id: ServerDelayMessage.java 3331 2007-06-08 02:17:59Z rakesh $
Author:
Rakesh Vidyadharan 2007-06-07
See Also:
Serialized Form

Field Summary
protected  Element message
          The element that represents the message contained in WAIT_FILE.
static String WAIT_FILE
          The resource file that contains the custom wait message to display.
 
Fields inherited from class nextapp.echo2.webrender.ServerDelayMessage
ELEMENT_ID_LONG_MESSAGE, ELEMENT_ID_MESSAGE
 
Constructor Summary
ServerDelayMessage(Locale[] locales)
          Create a new instance of the message for the specified locale.
 
Method Summary
protected  InputStream getInputStream(Locale[] locales)
          Return the InputStream for the resource file.
 Element getMessage()
          Return the message text to display.
protected  Document parseDocument(InputStream inputStream)
          Build the Document out of the contents in the specified InputStream.
 
Methods inherited from class nextapp.echo2.webrender.ServerDelayMessage
createFromResource
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

WAIT_FILE

public static final String WAIT_FILE
The resource file that contains the custom wait message to display. "/META-INF/resource/localisation/wait"

See Also:
Constant Field Values

message

protected Element message
The element that represents the message contained in WAIT_FILE.

Constructor Detail

ServerDelayMessage

public ServerDelayMessage(Locale[] locales)
                   throws IOException
Create a new instance of the message for the specified locale.

Parameters:
locales - The locale(s) of the client browser to use to fetch the localised message.
Throws:
IOException - If errors are encountered while reading the resource file.
See Also:
getInputStream(java.util.Locale[]), parseDocument(java.io.InputStream)
Method Detail

getInputStream

protected InputStream getInputStream(Locale[] locales)
                              throws IOException
Return the InputStream for the resource file.

Parameters:
locales - The locale(s) of the client browser to use to fetch the localised resource file.
Throws:
IOException - If errors are encountered while fetching the resource file.

parseDocument

protected Document parseDocument(InputStream inputStream)
                          throws IOException
Build the Document out of the contents in the specified InputStream.

Parameters:
inputStream - The InputStream to build the document from.
Returns:
Returns the initialised Document for convenience.
Throws:
IOException - If errors are encountered while reading from the InputStream.

getMessage

public Element getMessage()
Return the message text to display.

Specified by:
getMessage in class ServerDelayMessage