|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.dict4j.DictSession
public class DictSession
Dict protocol session
This class is thread-safe.
Constructor Summary | |
---|---|
DictSession(DictTransport transport)
|
|
DictSession(java.lang.String address)
|
|
DictSession(java.lang.String address,
int port)
|
Method Summary | |
---|---|
boolean |
auth(java.lang.String username,
java.lang.String password)
|
java.lang.String |
client(java.lang.String client)
|
void |
close()
|
java.lang.String |
databaseInfo(java.lang.String database)
|
java.util.List<Definition> |
define(DatabaseWord databaseWord)
|
java.util.List<Definition> |
define(java.lang.String word)
|
java.util.List<Definition> |
define(java.lang.String word,
Database database)
|
java.util.List<Definition> |
define(java.lang.String word,
java.lang.String database)
Get definitions of word from given database |
Banner |
getBanner()
|
java.lang.String |
help()
|
boolean |
isClosed()
|
boolean |
isOpen()
|
boolean |
isOptionMime()
|
java.util.List<DatabaseWord> |
match(java.lang.String word)
Match word in all available databases using default strategy |
java.util.List<DatabaseWord> |
match(java.lang.String word,
Database database)
|
java.util.List<DatabaseWord> |
match(java.lang.String word,
Database database,
Strategy strategy)
|
java.util.List<DatabaseWord> |
match(java.lang.String word,
java.lang.String database,
java.lang.String strategy)
Match word in given database using given strategy |
void |
open(java.lang.String client)
|
java.lang.String |
quit()
|
java.lang.String |
serverInfo()
|
void |
setLogAppender(DictLogAppender logAppender)
|
void |
setOptionMime()
|
java.util.List<Database> |
showDatabases()
|
java.util.List<Strategy> |
showStrategies()
|
java.lang.String |
status()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DictSession(java.lang.String address)
public DictSession(java.lang.String address, int port)
public DictSession(DictTransport transport)
Method Detail |
---|
public void setLogAppender(DictLogAppender logAppender)
public void open(java.lang.String client)
public boolean auth(java.lang.String username, java.lang.String password)
public void close()
public boolean isOpen()
public boolean isClosed()
public java.lang.String client(java.lang.String client)
public java.lang.String status()
public java.lang.String help()
public java.lang.String serverInfo()
public java.lang.String databaseInfo(java.lang.String database)
public java.util.List<Database> showDatabases()
public java.util.List<Strategy> showStrategies()
public java.util.List<Definition> define(java.lang.String word, java.lang.String database)
word
- word to matchdatabase
- database to search
public java.util.List<Definition> define(java.lang.String word)
public java.util.List<Definition> define(DatabaseWord databaseWord)
public java.util.List<Definition> define(java.lang.String word, Database database)
public java.util.List<DatabaseWord> match(java.lang.String word)
word
- word to match
public java.util.List<DatabaseWord> match(java.lang.String word, java.lang.String database, java.lang.String strategy)
word
- word to matchdatabase
- database to search matchesstrategy
- strategy to use for search
public java.util.List<DatabaseWord> match(java.lang.String word, Database database, Strategy strategy)
public java.util.List<DatabaseWord> match(java.lang.String word, Database database)
public java.lang.String quit()
public boolean isOptionMime()
public void setOptionMime()
public Banner getBanner()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |