org.whitesource.agent.api.dispatch
Class BaseRequest<R>

java.lang.Object
  extended by 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

Field Summary
protected  String agent
           
protected  String agentVersion
           
protected  String orgToken
           
protected  long timeStamp
           
protected  RequestType type
           
 
Constructor Summary
BaseRequest(RequestType type)
          Constructor
BaseRequest(RequestType type, String agent)
          Constructor
BaseRequest(RequestType type, String agent, String agentVersion)
          Constructor
 
Method Summary
 String agent()
           
 String agentVersion()
           
 String orgToken()
           
 void setAgent(String agent)
           
 void setAgentVersion(String agentVersion)
           
 void setOrgToken(String orgToken)
           
 void setTimeStamp(long timeStamp)
           
 long timeStamp()
           
 RequestType type()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

type

protected final RequestType type

agent

protected String agent

agentVersion

protected String agentVersion

orgToken

protected String orgToken

timeStamp

protected long timeStamp
Constructor Detail

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.
Method Detail

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.