|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.jspell.domain.JSpellDictionary
com.jspell.domain.net.JSpellDictionaryServlet
public class JSpellDictionaryServlet
JSpellDictionary subclass which is designed to communicate with a JSpellServlet being hosted on a web server. See JSpellServlet documentation for help in configuring a JSpellServlet to run on your web server.
| Field Summary |
|---|
| Fields inherited from class com.jspell.domain.JSpellDictionary |
|---|
batchCount, batchSize, defaultCountry, defaultLanguage, defaultVersion, errors, language, learnWords, maxSuggestions, suggestions |
| Constructor Summary | |
|---|---|
JSpellDictionaryServlet()
Construct a JSpellDictionaryServlet. |
|
| Method Summary | |
|---|---|
protected void |
checkResponse(java.lang.StringBuffer sb)
Performs the actual connection to the JSpell Servlet. |
boolean |
checkWord(JSpellWordBundle word)
Places a word in a batch to be checked by the JSpell Servlet. |
void |
close()
Closes the network connection to the dictionary server. |
java.util.Vector |
getLanguages()
Connects to the JSpell Servlet and retrieves the languages available in the JSpell Servlet. |
JSpellErrorInfo |
getNextError()
First check if there are words to be validated against the server that didn't make it in the last batch. |
protected void |
getResults()
Get results from the server. |
java.lang.String |
getURL()
Get the URL of the JSpell Servlet. |
protected void |
learnResponse(java.lang.StringBuffer sb)
Make a connection to the JSpell Servlet and persist the word contained in the StringBuffer. |
void |
learnWord(java.lang.String word)
Add a word to the internal valid words collection and call learnResponse to update the word in the JSpell Servlet. |
void |
open()
Opens access to a dictionary. |
protected void |
postResponse(java.lang.StringBuffer data)
|
protected void |
sendBatch()
Sends words to the server. |
void |
setBatchSize(int batchSize)
Set the number of words to validate in one call to the JSpell Servlet. |
void |
setURL(java.lang.String urlName)
Sets the URL of the JSpell Servlet. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public JSpellDictionaryServlet()
| Method Detail |
|---|
public final void open()
JSpellDictionaryAccessor
public void setURL(java.lang.String urlName)
urlName - a String.public java.lang.String getURL()
public void setBatchSize(int batchSize)
setBatchSize in interface JSpellDictionaryAccessorsetBatchSize in class JSpellDictionarybatchSize - an int.public void close()
public boolean checkWord(JSpellWordBundle word)
throws java.lang.Exception
checkWord in interface JSpellDictionaryAccessorcheckWord in class JSpellDictionaryword - a String.
java.lang.Exception - an Exception object.
public JSpellErrorInfo getNextError()
throws java.lang.Exception
getNextError in interface JSpellDictionaryAccessorgetNextError in class JSpellDictionaryjava.lang.Exception - an Exception object.
protected void sendBatch()
throws java.io.IOException
java.io.IOException - an Exception object.
protected void getResults()
throws java.io.IOException
java.io.IOException - an Exception object.
protected final void postResponse(java.lang.StringBuffer data)
throws java.io.IOException
java.io.IOException
protected final void checkResponse(java.lang.StringBuffer sb)
throws java.io.IOException
sb - a StringBuffer.
java.io.IOException - an Exception object.
protected void learnResponse(java.lang.StringBuffer sb)
throws java.io.IOException
sb - a StringBuffer.
java.io.IOException - an Exception object.
public java.util.Vector getLanguages()
throws java.io.IOException
java.io.IOException - an Exception object.public void learnWord(java.lang.String word)
learnWord in interface JSpellDictionaryAccessorlearnWord in class JSpellDictionaryword - a String.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||