public class Request extends Object implements Message
A Request object represents a request passed from a client to an agent. Each request is separate, complete and unordered. The agent may or may not take an action when it receives a request.
Requests are meant for controlling the agent, not for asking an agent nor sending an agent any sort of data.
Modifier and Type | Class and Description |
---|---|
static class |
Request.RequestType |
Message.MessageType
Modifier and Type | Field and Description |
---|---|
static String |
ACTION |
static String |
AUTH_TOKEN |
static String |
CLIENT_TOKEN |
static String |
UNKNOWN_HOSTNAME |
Constructor and Description |
---|
Request(Request.RequestType type,
InetSocketAddress target) |
Modifier and Type | Method and Description |
---|---|
void |
addListener(RequestResponseListener listener) |
Collection<RequestResponseListener> |
getListeners() |
String |
getParameter(String name) |
Collection<String> |
getParameterNames() |
String |
getReceiver() |
InetSocketAddress |
getTarget() |
Message.MessageType |
getType() |
void |
removeListener(RequestResponseListener listener) |
void |
setParameter(String name,
String value) |
void |
setReceiver(String clazz) |
String |
toString() |
public static final String CLIENT_TOKEN
public static final String AUTH_TOKEN
public static final String ACTION
public static final String UNKNOWN_HOSTNAME
public Request(Request.RequestType type, InetSocketAddress target)
public Message.MessageType getType()
public Collection<String> getParameterNames()
public void setReceiver(String clazz)
public String getReceiver()
public InetSocketAddress getTarget()
public void addListener(RequestResponseListener listener)
public void removeListener(RequestResponseListener listener)
public Collection<RequestResponseListener> getListeners()
Copyright © 2017. All Rights Reserved.