|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjavax.servlet.GenericServlet
javax.servlet.http.HttpServlet
com.wallstreetwise.app.jspell.domain.net.JSpellServlet
public class JSpellServlet
The JSpellServlet class is designed to be accessed from a Java client running as an applet or an application. The applet or application will use the JSpellDictionaryServlet class to manage a connection to this servlet.
| Field Summary | |
|---|---|
protected java.text.SimpleDateFormat |
logDateFmt
Date format for log files. |
| Constructor Summary | |
|---|---|
JSpellServlet()
Constructs the JSpellServlet instance. |
|
| Method Summary | |
|---|---|
void |
destroy()
Closes any open logging and JSpellIndex resources. |
void |
doGet(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp)
Handles incoming requests from clients and delegates to processClientData. |
protected void |
doPost(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp)
|
java.lang.String |
getIndexDirectory()
Returns the location of the JSpell dictionary files. |
java.lang.String |
getLogFileName()
Returns the current value of the logFileName. |
java.lang.String |
getPropertiesFile()
Returns the current value of the propertiesFile. |
java.lang.String |
getServletInfo()
Returns the name, copyright and authorship of the JSpellServlet. |
protected void |
indexChanged()
Called whenever the language or country changes. |
void |
init(javax.servlet.ServletConfig config)
Called whenever the JSpellServlet is loaded by the Java servlet container. |
void |
logAccess(java.lang.String msg)
Provides logging ability for the JSpellServlet instances. |
protected void |
logFileNameChanged()
Called whenever the logFileName changes. |
protected byte[] |
processClientData(java.util.Vector text,
JSpellDictionaryLocal jdLocal)
Handles incoming client requests to search for a word and return suggestions or add a new word to the dictionary. |
protected byte[] |
processClientDataG(java.util.Vector text,
JSpellDictionaryLocal jdLocal)
Handles incoming client requests to search for a word and return suggestions or add a new word to the dictionary. |
protected void |
propertiesFileChanged()
Called whenever the propertiesFile property is changed and upon initialization of the servlet. |
void |
setIndexDirectory(java.lang.String indexDirectory)
Sets the location of the JSpell dictionary files. |
void |
setLogFileName(java.lang.String logFileName)
Changes the logFileName value. |
void |
setPropertiesFile(java.lang.String propertiesFile)
Change the propertiesFile value. |
| Methods inherited from class javax.servlet.http.HttpServlet |
|---|
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, service |
| Methods inherited from class javax.servlet.GenericServlet |
|---|
getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletName, init, log, log |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected java.text.SimpleDateFormat logDateFmt
| Constructor Detail |
|---|
public JSpellServlet()
| Method Detail |
|---|
protected void propertiesFileChanged()
throws javax.servlet.ServletException
javax.servlet.ServletException - a ServletException object.
protected void indexChanged()
throws javax.servlet.ServletException
javax.servlet.ServletException - a ServletException object.
protected void logFileNameChanged()
throws javax.servlet.ServletException
javax.servlet.ServletException - a ServletException object.
public void setPropertiesFile(java.lang.String propertiesFile)
throws javax.servlet.ServletException
propertiesFile - a String.
javax.servlet.ServletException - a ServletException object.public java.lang.String getPropertiesFile()
public void setIndexDirectory(java.lang.String indexDirectory)
throws javax.servlet.ServletException
indexDirectory - a String.
javax.servlet.ServletException - a ServletException object.public java.lang.String getIndexDirectory()
public void setLogFileName(java.lang.String logFileName)
throws javax.servlet.ServletException
logFileName - a String.
javax.servlet.ServletException - a ServletException object.public java.lang.String getLogFileName()
public void init(javax.servlet.ServletConfig config)
throws javax.servlet.ServletException
init in interface javax.servlet.Servletinit in class javax.servlet.GenericServletconfig - a ServletConfig object.
javax.servlet.ServletException - a ServletException object.
protected final byte[] processClientData(java.util.Vector text,
JSpellDictionaryLocal jdLocal)
text - a Vector.jdLocal - a JSpellDictionaryLocal object.
protected final byte[] processClientDataG(java.util.Vector text,
JSpellDictionaryLocal jdLocal)
text - a Vector.jdLocal - a JSpellDictionaryLocal object.
public final void logAccess(java.lang.String msg)
msg - a String.public void destroy()
destroy in interface javax.servlet.Servletdestroy in class javax.servlet.GenericServletpublic java.lang.String getServletInfo()
getServletInfo in interface javax.servlet.ServletgetServletInfo in class javax.servlet.GenericServlet
protected void doPost(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp)
throws javax.servlet.ServletException,
java.io.IOException
doPost in class javax.servlet.http.HttpServletjavax.servlet.ServletException
java.io.IOException
public void doGet(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp)
throws javax.servlet.ServletException,
java.io.IOException
doGet in class javax.servlet.http.HttpServletreq - an HttpServletRequest object.resp - an HttpServletResponse object.
javax.servlet.ServletException - a ServletException object.
java.io.IOException - an IOException object.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||