|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.alicebot.server.core.Multiplexor org.alicebot.server.core.FlatFileMultiplexor
public class FlatFileMultiplexor
Presently more a proof-of-concept than anything else,
for checking the new Multiplexor
architecture.
Uses "flat-file" Java properties files, as in Program B, to store predicate data.
Field Summary |
---|
Fields inherited from class org.alicebot.server.core.Multiplexor |
---|
ASTERISK, avgResponseTime, EMPTY_STRING, HOST_NAME, INPUT, PREDICATE_EMPTY_DEFAULT, QUOTE_MARK, responseCount, SECRET_KEY, SHOW_CONSOLE, SHOW_MATCH_TRACE, SPACE, STAR, startTime, THAT, TOPIC, totalTime, USE_TARGETING, VALUE |
Constructor Summary | |
---|---|
FlatFileMultiplexor()
|
Method Summary | |
---|---|
boolean |
changePassword(java.lang.String userid,
java.lang.String password,
java.lang.String secretKey,
java.lang.String botid)
Always returns true (FlatFileMultiplexor currently does not support authentication). |
boolean |
checkUser(java.lang.String userid,
java.lang.String password,
java.lang.String secretKey,
java.lang.String botid)
Always returns true (FlatFileMultiplexor currently does not support authentication). |
boolean |
createUser(java.lang.String userid,
java.lang.String password,
java.lang.String secretKey,
java.lang.String botid)
Always returns true (FlatFileMultiplexor currently does not support authentication). |
java.lang.String |
loadPredicate(java.lang.String name,
java.lang.String userid,
java.lang.String botid)
Loads the value of a predicate from disk. |
void |
savePredicate(java.lang.String name,
java.lang.String value,
java.lang.String userid,
java.lang.String botid)
Saves a predicate to disk. |
int |
useridCount(java.lang.String botid)
Returns a count of known userids. |
Methods inherited from class org.alicebot.server.core.Multiplexor |
---|
addPulse, averageResponseTime, getInternalResponse, getResponse, initialize, pulse, queriesPerHour |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FlatFileMultiplexor()
Method Detail |
---|
public boolean checkUser(java.lang.String userid, java.lang.String password, java.lang.String secretKey, java.lang.String botid)
checkUser
in class Multiplexor
userid
- the userid to checkpassword
- the password to checksecretKey
- the secret key that should authenticate this request
public boolean createUser(java.lang.String userid, java.lang.String password, java.lang.String secretKey, java.lang.String botid)
createUser
in class Multiplexor
userid
- the userid to usepassword
- the password to assignsecretKey
- the secret key that should authenticate this request
public boolean changePassword(java.lang.String userid, java.lang.String password, java.lang.String secretKey, java.lang.String botid)
changePassword
in class Multiplexor
userid
- the useridpassword
- the new passwordsecretKey
- the secret key that should authenticate this request
public void savePredicate(java.lang.String name, java.lang.String value, java.lang.String userid, java.lang.String botid)
savePredicate
in class Multiplexor
name
- predicate namevalue
- predicate valueuserid
- user identifierpublic java.lang.String loadPredicate(java.lang.String name, java.lang.String userid, java.lang.String botid) throws NoSuchPredicateException
loadPredicate
in class Multiplexor
name
- predicate nameuserid
- user identifier
NoSuchPredicateException
- if there is no predicate with this namepublic int useridCount(java.lang.String botid)
Multiplexor
useridCount
in class Multiplexor
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |