com.almende.eve.transport.http
Class AgentServlet
java.lang.Object
javax.servlet.GenericServlet
javax.servlet.http.HttpServlet
com.almende.eve.transport.http.AgentServlet
- All Implemented Interfaces:
- Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig
public class AgentServlet
- extends javax.servlet.http.HttpServlet
- See Also:
- Serialized Form
Method Summary |
protected void |
doDelete(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp)
Delete an agent
usage: DELETE /servlet/agentId |
protected void |
doGet(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp)
Get an agents web interface
Usage: GET /servlet/{agentId} |
void |
doPost(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp)
Send a JSON-RPC message to an agent
Usage: POST /servlet/{agentId}
With a JSON-RPC request as body. |
protected void |
doPut(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp)
Create a new agent
Usage: PUT /servlet/{agentId}?type={agentType}
Where agentType is the full class path of the agent. |
void |
init()
|
Methods inherited from class javax.servlet.http.HttpServlet |
doHead, doOptions, doTrace, getLastModified, service, service |
Methods inherited from class javax.servlet.GenericServlet |
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AgentServlet
public AgentServlet()
init
public void init()
- Overrides:
init
in class javax.servlet.GenericServlet
doGet
protected void doGet(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp)
throws javax.servlet.ServletException,
IOException
- Get an agents web interface
Usage: GET /servlet/{agentId}
- Overrides:
doGet
in class javax.servlet.http.HttpServlet
- Throws:
javax.servlet.ServletException
IOException
doPost
public void doPost(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp)
throws IOException
- Send a JSON-RPC message to an agent
Usage: POST /servlet/{agentId}
With a JSON-RPC request as body.
Response will be a JSON-RPC response.
- Overrides:
doPost
in class javax.servlet.http.HttpServlet
- Throws:
IOException
doPut
protected void doPut(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp)
throws javax.servlet.ServletException,
IOException
- Create a new agent
Usage: PUT /servlet/{agentId}?type={agentType}
Where agentType is the full class path of the agent.
Returns a list with the urls of the created agent.
- Overrides:
doPut
in class javax.servlet.http.HttpServlet
- Throws:
javax.servlet.ServletException
IOException
doDelete
protected void doDelete(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp)
throws javax.servlet.ServletException,
IOException
- Delete an agent
usage: DELETE /servlet/agentId
- Overrides:
doDelete
in class javax.servlet.http.HttpServlet
- Throws:
javax.servlet.ServletException
IOException
Copyright © 2013 Almende BV. All Rights Reserved.