com.ldodds.foafamatic.http
Class AddFriendHandler
java.lang.Object
|
+--com.ldodds.foafamatic.http.AddFriendHandler
- All Implemented Interfaces:
- Responder
- public class AddFriendHandler
- extends java.lang.Object
- implements Responder
TODO use DocumentHandler to generate the fixed (and templated?) responses.
- Author:
- ldodds
Field Summary |
static java.lang.String |
PARAM_URL
|
Method Summary |
boolean |
canRespond(java.lang.String path)
|
java.lang.String |
getMimeType()
|
byte[] |
respond(java.lang.String path,
java.util.Map parameters)
Called by the HTTP Server to ask the object to handle the HTTP
request. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PARAM_URL
public static final java.lang.String PARAM_URL
- See Also:
- Constant Field Values
AddFriendHandler
public AddFriendHandler()
- Constructor for AddFriendHandler.
respond
public byte[] respond(java.lang.String path,
java.util.Map parameters)
throws java.io.IOException
- Description copied from interface:
Responder
- Called by the HTTP Server to ask the object to handle the HTTP
request. The only context information provided is the path info
and the URL parameters. No details of the user agent, etc. are provided.
- Specified by:
respond
in interface Responder
- Parameters:
path
- the path-infoparameters
- the url parameters
- Returns:
- a byte array containing the response.
- Throws:
java.io.IOException
- if there were a problem handling the request, server
will generate an HTTP 500 response containing the
exception message- See Also:
com.ldodds.foafamatic.http.RequestHandler#handle(String, Map)
canRespond
public boolean canRespond(java.lang.String path)
- Specified by:
canRespond
in interface Responder
- See Also:
com.ldodds.foafamatic.http.AbstractRequestHandler#canHandle(String)
getMimeType
public java.lang.String getMimeType()
- Specified by:
getMimeType
in interface Responder
- See Also:
com.ldodds.foafamatic.http.RequestHandler#getMimeType()