|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
com.dionloy.joogleagent.JAJoogleAgent
JAJoogleAgent is a Jabber agent that can query Google for data and return those responses over the Jabber network.
Note that this is not multi-threaded and is not meant for heavy usage. This was done as a personal exercise in learning about JabberBeans, XML parsing in Java and the Jabber protocol. Version: $Version$
| Constructor Summary | |
JAJoogleAgent()
|
|
| Method Summary | |
boolean |
configure(java.util.Properties props)
Configures the object from the given Properties. |
void |
connected(com.dionloy.joogleagent.ConnectionEvent ce)
|
void |
connectFailed(com.dionloy.joogleagent.ConnectionEvent ce)
|
void |
connecting(com.dionloy.joogleagent.ConnectionEvent ce)
|
void |
connectionChanged(com.dionloy.joogleagent.ConnectionEvent ce)
|
void |
disconnected(com.dionloy.joogleagent.ConnectionEvent ce)
|
static void |
main(java.lang.String[] argv)
Main program. |
static void |
printUsage()
Prints out all the command line options. |
void |
receivedPacket(com.dionloy.joogleagent.PacketEvent pe)
Called when a packet has been received. |
void |
run()
Runs the agent by connecting to the Jabber server. |
void |
sendFailed(com.dionloy.joogleagent.PacketEvent pe)
Called when a send has failed. |
protected void |
sendHeader(org.jabber.jabberbeans.util.JID user)
Sends the header. |
protected void |
sendNoResultsMessage(org.jabber.jabberbeans.util.JID user)
Sends a message to the user saying that there were no results returned for his query. |
protected void |
sendResult(com.dionloy.joogle.JGResult result,
org.jabber.jabberbeans.util.JID user)
Sends the result to the user. |
protected void |
sendResults(com.dionloy.joogle.JGDocument document,
org.jabber.jabberbeans.util.JID fromUser)
Sends the results from the Joogle query back to the user. |
void |
sentPacket(com.dionloy.joogleagent.PacketEvent pe)
Called when we have sent a packet. |
| Constructor Detail |
public JAJoogleAgent()
| Method Detail |
public static void printUsage()
public static void main(java.lang.String[] argv)
public boolean configure(java.util.Properties props)
public void run()
throws java.net.UnknownHostException,
java.io.IOException,
java.lang.InstantiationException
public void receivedPacket(com.dionloy.joogleagent.PacketEvent pe)
public void sentPacket(com.dionloy.joogleagent.PacketEvent pe)
public void sendFailed(com.dionloy.joogleagent.PacketEvent pe)
public void connected(com.dionloy.joogleagent.ConnectionEvent ce)
public void disconnected(com.dionloy.joogleagent.ConnectionEvent ce)
public void connecting(com.dionloy.joogleagent.ConnectionEvent ce)
public void connectFailed(com.dionloy.joogleagent.ConnectionEvent ce)
public void connectionChanged(com.dionloy.joogleagent.ConnectionEvent ce)
protected void sendResults(com.dionloy.joogle.JGDocument document,
org.jabber.jabberbeans.util.JID fromUser)
protected void sendHeader(org.jabber.jabberbeans.util.JID user)
protected void sendResult(com.dionloy.joogle.JGResult result,
org.jabber.jabberbeans.util.JID user)
protected void sendNoResultsMessage(org.jabber.jabberbeans.util.JID user)
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||