org.whitesource.agent.api.dispatch
Class BaseRequest<R>
java.lang.Object
org.whitesource.agent.api.dispatch.BaseRequest<R>
- Type Parameters:
R - Type of expected result.
- All Implemented Interfaces:
- Serializable, ServiceRequest<R>
- Direct Known Subclasses:
- CheckPoliciesRequest, PropertiesRequest, ReportRequest, UpdateInventoryRequest
public abstract class BaseRequest<R>
- extends Object
- implements ServiceRequest<R>
Base, abstract, implementation of the interface.
- Author:
- Edo.Shor
- See Also:
- Serialized Form
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
type
protected final RequestType type
agent
protected String agent
agentVersion
protected String agentVersion
orgToken
protected String orgToken
timeStamp
protected long timeStamp
BaseRequest
public BaseRequest(RequestType type)
- Constructor
- Parameters:
type - Request operation type.
BaseRequest
public BaseRequest(RequestType type,
String agent)
- Constructor
- Parameters:
type - Request operation type.agent - Agent type identifier.
BaseRequest
public BaseRequest(RequestType type,
String agent,
String agentVersion)
- Constructor
- Parameters:
type - Request operation type.agent - Agent type identifier.agentVersion - Agent version.
type
public RequestType type()
- Specified by:
type in interface ServiceRequest<R>
- Returns:
- Request type.
orgToken
public String orgToken()
- Specified by:
orgToken in interface ServiceRequest<R>
- Returns:
- WhiteSource service token for the organization.
agent
public String agent()
- Specified by:
agent in interface ServiceRequest<R>
- Returns:
- Agent type identifier.
agentVersion
public String agentVersion()
- Specified by:
agentVersion in interface ServiceRequest<R>
- Returns:
- Agent version.
timeStamp
public long timeStamp()
- Specified by:
timeStamp in interface ServiceRequest<R>
- Returns:
- Time stamp when the request created (client side)
setAgent
public void setAgent(String agent)
setAgentVersion
public void setAgentVersion(String agentVersion)
setOrgToken
public void setOrgToken(String orgToken)
setTimeStamp
public void setTimeStamp(long timeStamp)
Copyright © 2011-2012 White Source. All Rights Reserved.