public class RemoteService extends BasicSense
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
PANNOUS |
static java.lang.String |
SERVER |
conversations, DAY, DEFAULT_SPEAKER, engaged, HOUR, MAX_FILE_SIZE, MINUTE, RETRY
Constructor and Description |
---|
RemoteService() |
Modifier and Type | Method and Description |
---|---|
void |
disconnect() |
javax.xml.parsers.DocumentBuilder |
getParser() |
void |
output(Vertex output)
Post, process the post request.
|
org.w3c.dom.Element |
parseXML(java.lang.String xml)
Parse the input XML stream into a DOM.
|
void |
pool()
Reset state when instance is pooled.
|
java.lang.String |
request(java.lang.String message,
java.lang.String bot,
java.lang.String botid,
java.lang.String server,
Primitive service,
java.lang.String apikey,
int limit,
java.lang.String hint,
Network network)
Invoke the remote service request, and return the result.
|
java.lang.String |
requestFORGE(java.lang.String message,
java.lang.String botid,
java.lang.String server,
java.lang.String apikey,
int limit,
java.lang.String hint,
Network network)
Invoke the XML HTTP request.
|
java.lang.String |
requestFreebase(java.lang.String message,
java.lang.String botid,
java.lang.String server,
java.lang.String apikey,
int limit,
java.lang.String hint,
Network network)
Invoke the Freebase sense.
|
java.lang.String |
requestHTML(java.lang.String message,
java.lang.String botid,
java.lang.String server,
java.lang.String apikey,
int limit,
java.lang.String hint,
Network network)
Invoke the HTML HTTP request.
|
java.lang.String |
requestJSON(java.lang.String message,
java.lang.String botid,
java.lang.String server,
java.lang.String apikey,
int limit,
java.lang.String hint,
Network network)
Invoke the XML HTTP request.
|
java.lang.String |
requestPannous(java.lang.String message,
java.lang.String botid,
java.lang.String server,
java.lang.String apikey,
int limit)
Invoke the Pannous service.
|
java.lang.String |
requestWikidata(java.lang.String message,
java.lang.String botid,
java.lang.String server,
java.lang.String apikey,
int limit,
java.lang.String hint,
Network network)
Invoke the Wikidata sense.
|
java.lang.String |
requestWiktionary(java.lang.String message,
java.lang.String botid,
java.lang.String server,
java.lang.String apikey,
int limit,
java.lang.String hint,
Network network)
Invoke the Wiktionary sense.
|
java.lang.String |
requestXML(java.lang.String message,
java.lang.String botid,
java.lang.String server,
java.lang.String apikey,
int limit,
java.lang.String hint,
Network network)
Invoke the XML HTTP request.
|
void |
shutdown()
Stop sensing.
|
addListener, awake, checkEngaged, checkSentence, discover, discoverSentence, getAction, getBot, getEmotionalState, getLanguageState, getListeners, getName, getPrimitive, getResponseListener, getShortTermMemory, initialize, input, input, isEnabled, log, log, log, migrateProperties, notifyExceptionListeners, notifyResponseListener, printInput, removeListener, saveProperties, setAction, setBot, setEmotionalState, setIsEnabled, setLanguageState, setName, setResponseListener, toString
public static java.lang.String PANNOUS
public static java.lang.String SERVER
public java.lang.String request(java.lang.String message, java.lang.String bot, java.lang.String botid, java.lang.String server, Primitive service, java.lang.String apikey, int limit, java.lang.String hint, Network network) throws java.lang.Exception
java.lang.Exception
public java.lang.String requestWikidata(java.lang.String message, java.lang.String botid, java.lang.String server, java.lang.String apikey, int limit, java.lang.String hint, Network network) throws java.lang.Exception
java.lang.Exception
public java.lang.String requestXML(java.lang.String message, java.lang.String botid, java.lang.String server, java.lang.String apikey, int limit, java.lang.String hint, Network network) throws java.lang.Exception
java.lang.Exception
public java.lang.String requestJSON(java.lang.String message, java.lang.String botid, java.lang.String server, java.lang.String apikey, int limit, java.lang.String hint, Network network) throws java.lang.Exception
java.lang.Exception
public java.lang.String requestFORGE(java.lang.String message, java.lang.String botid, java.lang.String server, java.lang.String apikey, int limit, java.lang.String hint, Network network) throws java.lang.Exception
java.lang.Exception
public java.lang.String requestHTML(java.lang.String message, java.lang.String botid, java.lang.String server, java.lang.String apikey, int limit, java.lang.String hint, Network network) throws java.lang.Exception
java.lang.Exception
public java.lang.String requestFreebase(java.lang.String message, java.lang.String botid, java.lang.String server, java.lang.String apikey, int limit, java.lang.String hint, Network network) throws java.lang.Exception
java.lang.Exception
public java.lang.String requestWiktionary(java.lang.String message, java.lang.String botid, java.lang.String server, java.lang.String apikey, int limit, java.lang.String hint, Network network) throws java.lang.Exception
java.lang.Exception
public java.lang.String requestPannous(java.lang.String message, java.lang.String botid, java.lang.String server, java.lang.String apikey, int limit) throws java.lang.Exception
java.lang.Exception
public void shutdown()
shutdown
in interface Sense
shutdown
in class BasicSense
public void pool()
pool
in interface Sense
pool
in class BasicSense
public void disconnect()
public javax.xml.parsers.DocumentBuilder getParser() throws java.lang.Exception
java.lang.Exception
public org.w3c.dom.Element parseXML(java.lang.String xml) throws java.lang.Exception
java.lang.Exception
public void output(Vertex output)
output
in interface Sense
output
in class BasicSense