public class HttpCommunicator extends Communicator
| Modifier and Type | Class and Description |
|---|---|
protected class |
HttpCommunicator.HttpQueryProcessor |
protected class |
HttpCommunicator.SiteInfo
Information about a site
|
Communicator.QueryExecutionException| Modifier and Type | Field and Description |
|---|---|
protected Engine |
m_engine |
protected java.util.Map<java.lang.String,HttpCommunicator.SiteInfo> |
m_siteInfo |
| Constructor and Description |
|---|
HttpCommunicator() |
| Modifier and Type | Method and Description |
|---|---|
void |
addSiteInfo(java.lang.String name,
java.lang.String url) |
QueryProcessor |
getQueryProcessor(QueryPlan qp) |
QueryProcessor |
getQueryProcessor(Relation query) |
protected java.lang.String |
postData(java.lang.String destination_url,
java.lang.String payload)
Sends a string of data through an TCP connection at a given URL:port
using an HTTP POST request
|
void |
run()
Listen to the connection for any incoming messages
|
protected java.lang.String |
sendData(java.net.URL url,
java.lang.String data)
Sends a string of data through an TCP connection at a given URL:port
|
protected void |
sendQuery(java.lang.String site_name,
Relation r) |
protected void |
sendQuery(java.lang.String site_name,
java.util.Set<Relation> rels) |
protected java.util.Map<java.lang.String,HttpCommunicator.SiteInfo> m_siteInfo
protected Engine m_engine
public void addSiteInfo(java.lang.String name,
java.lang.String url)
protected void sendQuery(java.lang.String site_name,
Relation r)
throws Communicator.QueryExecutionException
protected void sendQuery(java.lang.String site_name,
java.util.Set<Relation> rels)
throws Communicator.QueryExecutionException
protected java.lang.String sendData(java.net.URL url,
java.lang.String data)
throws java.io.IOException
destination_url - The destination URLdata - The data to sendjava.io.IOExceptionprotected java.lang.String postData(java.lang.String destination_url,
java.lang.String payload)
throws java.io.IOException
host - The destination hostlocation - The location on the host (i.e. the page name)payload - The data to sendjava.io.IOExceptionpublic QueryProcessor getQueryProcessor(Relation query)
getQueryProcessor in class Communicatorpublic QueryProcessor getQueryProcessor(QueryPlan qp)
getQueryProcessor in class Communicatorpublic void run()
Copyright © Sylvain HallĂ©. All Rights Reserved.