public class ServerDelayMessage extends ServerDelayMessage
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.
| Modifier and Type | Field and Description |
|---|---|
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.
|
ELEMENT_ID_LONG_MESSAGE, ELEMENT_ID_MESSAGE| Constructor and Description |
|---|
ServerDelayMessage(Locale[] locales)
Create a new instance of the message for the specified locale.
|
| Modifier and Type | Method and Description |
|---|---|
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. |
createFromResourcepublic static final String WAIT_FILE
public ServerDelayMessage(Locale[] locales) throws IOException
locales - The locale(s) of the client browser to use to fetch the
localised message.IOException - If errors are encountered while reading the resource
file.getInputStream(java.util.Locale[]),
parseDocument(java.io.InputStream)protected InputStream getInputStream(Locale[] locales) throws IOException
InputStream for the resource file.locales - The locale(s) of the client browser to use to fetch the
localised resource file.IOException - If errors are encountered while fetching the resource
file.protected Document parseDocument(InputStream inputStream) throws IOException
Document out of the contents in the specified
InputStream.inputStream - The InputStream to build the document from.Document for convenience.IOException - If errors are encountered while reading from the
InputStream.public Element getMessage()
message text to display.getMessage in class ServerDelayMessage