Java Reference
In-Depth Information
Google Wave Robots
The Google Wave Robot API works a bit differently. It's a programmatic way to
interact with the conversation thread without requiring a user interface. Wave Robots
are automated participants in a wave and are notified via XMPP of any updates or
additions to the wave. They can then respond accordingly and add contextual
information to the wave or embed a gadget on the fly.
Wave Robots can talk with users and interact with the wave by adding content
from outside sources. Consider the case where two friends or colleagues are
discussing the stock market. Each time they mention a stock in the conversation,
the robot can chime in with some useful details like current quotes, news about that
stock, or historical trending. At this time, robots are only supported as Google App
Engine hosted applications. The ability to build an application that can intelligently
contribute to a conversation in real time is pretty appealing. You're going to create a
simple robot that will send a welcome message to a group that is added to a wave and
that will respond when someone mentions Apress.
Note Google Wave should be released around the time of this topic's publication. If you're following
these examples and Wave is still in preview mode, you can use the Account Request form at
https://services.google.com/fb/forms/wavesignupfordev to request access to the
Developer Sandbox.
Before you can create the project in Eclipse, you need to gather a few prerequisites, the
first being a few .jar files that you need in order to receive and respond to requests from
Wave. Navigate to http://code.google.com/p/wave-robot-java-client/downloads/list
and download the following files:
jsonrpc.jar
json.jar
wave-robot-api-version.jar
Next, you need to decide on an application ID for the robot. Remember, App Engine
allows you to register only 10 application IDs. You can't rename or remove them once
they've been created. If you'd rather reuse one from a previous example in the topic,
you can just change the version number and the application's default version in the
Administration Console, as demonstrated earlier in this chapter. In this example,
we'll use apresswave as the application ID, as shown in Figure 9-8.
 
Search WWH ::




Custom Search