Class WhatsNewResponder
java.lang.Object
|
+--mstar.Responder
|
+--WhatsNewResponder
- public class WhatsNewResponder
- extends Responder
Responds to requests about what's new. The responder picks a headline news
story from one of its online newspapers and returns the information.
- Version:
- 1.2
- Author:
- Thaddeus O. Cooper
|
Method Summary |
protected void |
buildResponse(java.lang.String s)
|
boolean |
canProcess(Chatter c)
Determines if this responder will respond to the data contained in
the chatter. |
protected boolean |
fetchURL()
|
protected java.lang.String |
getURL()
|
void |
process()
Actually process the input from the collaborative environment and
add the actions and responses to the Vector to be output when this
routine returns. |
java.lang.String |
serviceType()
Returns a string the defines the type of service that this
responder provides. |
| Methods inherited from class mstar.Responder |
addAction,
addResponse,
addRobotAction,
getAction,
getActions,
getCommands,
getConnection,
getHow,
getInputStream,
getMap,
getOutputStream,
getOwner,
getPlayerMap,
getProcessTable,
getProperties,
getResponse,
getRobotName,
getRoomParser,
getShared,
getState,
getWhat,
getWho,
setAction,
setCommands,
setConnection,
setHow,
setInputStream,
setMap,
setOutputStream,
setOwner,
setPlayerMap,
setProcessTable,
setProperties,
setResponse,
setRobotName,
setRoomParser,
setShared,
setState,
setWhat,
setWho |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
WhatsNewResponder
public WhatsNewResponder()
getURL
protected java.lang.String getURL()
fetchURL
protected boolean fetchURL()
buildResponse
protected void buildResponse(java.lang.String s)
process
public void process()
- Description copied from class: Responder
- Actually process the input from the collaborative environment and
add the actions and responses to the Vector to be output when this
routine returns.
- Overrides:
- process in class Responder
serviceType
public java.lang.String serviceType()
- Description copied from class: Responder
- Returns a string the defines the type of service that this
responder provides. Some examples include: NEWS, DIRECTIONS, and
DEFAULT.
- Overrides:
- serviceType in class Responder
- Tags copied from class: Responder
- Returns:
- the String that defines the type of service.
canProcess
public boolean canProcess(Chatter c)
- Description copied from class: Responder
- Determines if this responder will respond to the data contained in
the chatter. If the chatter is able to be processed by this
responder, then it should return true, if not it should return
false.
- Overrides:
- canProcess in class Responder
- Tags copied from class: Responder
- Returns:
- true if this reponder can process the input, false
otherwise.