net.geant.edugain.base
Class Request

java.lang.Object
  extended by net.geant.edugain.base.Request
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
AttributeRequest, AuthenticationRequest, AuthorizationRequest

public abstract class Request
extends java.lang.Object
implements java.io.Serializable

Defines a generic eduGAIN class for requests. The class will be extended depending on the type of request: Authentication, Attributes, Authorization or Home Location.

Author:
Jose Manuel Macias, Diego R. Lopez
See Also:
Serialized Form

Field Summary
protected  java.lang.String cacheReference
          An optional parameter including a ResponseID argument of a previous Response.
protected  java.net.URI consumerId
          The component identifier for the consumer of the request.
private  java.util.Date issued
          The date the Request was issued.
protected  java.net.URI producerId
          The component identifier for the producer of the request.
private  java.security.SecureRandom random
          A secure random number generator
protected  java.lang.String requestID
          A reference (internally generated by the requester) for this operation to be used in further interactions regarding the request.
protected  java.net.URI resource
          The URI of the resource the authorisation is requested for.
private  int validatedTrust
          Deprecated.  
 
Constructor Summary
Request()
          Creates a new instance of a Request.
 
Method Summary
 void generateRequestID()
          Sets a ramdomly generated reference for this request operation to be used in the inResponseTo field of the corresponding response.
 java.lang.String getCacheReference()
          Gets the value of the cacheReference field
 java.net.URI getConsumerId()
          Gets the component identifier for the eduGAIN component consuming this request .
 java.util.Date getIssued()
          Returns the date this request was issued
 java.net.URI getProducerId()
          Gets the component identifier for the eduGAIN component producing this request .
 java.lang.String getRequestID()
          Returns the identifier of the request
 java.net.URI getResource()
          Gets the URI of the resource whose access originated the operation
 int getValidatedTrust()
          Deprecated.  
 void setCacheReference(java.lang.String cref)
          Sets a cache reference (this includes a ResponseID argument of a previous AuthNResponse )
 void setConsumerId(java.net.URI consumerId)
          Sets the component identifier for the eduGAIN component consuming this request.
 void setIssued(java.util.Date issued)
          Sets the date this request is being issued (Issue Instant)
 void setProducerId(java.net.URI producerId)
          Sets the component identifier for the eduGAIN component producing this request.
 void setRequestID()
          Deprecated.  
 void setRequestID(java.lang.String id)
          Sets a reference for this request externally.
 void setResource(java.net.URI res)
          The URI of the resource whose access originated the operation
 void setValidatedTrust(int validatedTrust)
          Deprecated.  
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

random

private java.security.SecureRandom random
A secure random number generator


requestID

protected java.lang.String requestID
A reference (internally generated by the requester) for this operation to be used in further interactions regarding the request.


resource

protected java.net.URI resource
The URI of the resource the authorisation is requested for.


producerId

protected java.net.URI producerId
The component identifier for the producer of the request.


consumerId

protected java.net.URI consumerId
The component identifier for the consumer of the request.


cacheReference

protected java.lang.String cacheReference
An optional parameter including a ResponseID argument of a previous Response.


validatedTrust

@Deprecated
private int validatedTrust
Deprecated. 
An integer indicating if this request has been validated.


issued

private java.util.Date issued
The date the Request was issued.

Constructor Detail

Request

public Request()
Creates a new instance of a Request.

Method Detail

setRequestID

@Deprecated
public void setRequestID()
Deprecated. 

Sets a ramdomly generated reference for this request operation to be used in the inResponseTo field of the corresponding response.


generateRequestID

public void generateRequestID()
Sets a ramdomly generated reference for this request operation to be used in the inResponseTo field of the corresponding response.


setRequestID

public void setRequestID(java.lang.String id)

Sets a reference for this request externally.

WARNING: this method is used only when rebuilding the request. Please never use it with your own IDs!


getRequestID

public java.lang.String getRequestID()
Returns the identifier of the request


setResource

public void setResource(java.net.URI res)
The URI of the resource whose access originated the operation


getResource

public java.net.URI getResource()
Gets the URI of the resource whose access originated the operation


setCacheReference

public void setCacheReference(java.lang.String cref)
Sets a cache reference (this includes a ResponseID argument of a previous AuthNResponse )


getProducerId

public java.net.URI getProducerId()
Gets the component identifier for the eduGAIN component producing this request .

Returns:
an URN following eduGAIN naming conventions.

setProducerId

public void setProducerId(java.net.URI producerId)
Sets the component identifier for the eduGAIN component producing this request.

Parameters:
producerId - An URN following eduGAIN component naming conventions.

getConsumerId

public java.net.URI getConsumerId()
Gets the component identifier for the eduGAIN component consuming this request .

Returns:
an URN following eduGAIN naming conventions.

setConsumerId

public void setConsumerId(java.net.URI consumerId)
Sets the component identifier for the eduGAIN component consuming this request.

Parameters:
consumerId - An URN following eduGAIN component naming conventions.

getCacheReference

public java.lang.String getCacheReference()
Gets the value of the cacheReference field

Returns:
the value of the cacheReference field

getValidatedTrust

@Deprecated
public int getValidatedTrust()
Deprecated. 

Returns the result of a previous trust validation

Returns:
the result of a previous trust validation

setValidatedTrust

@Deprecated
public void setValidatedTrust(int validatedTrust)
Deprecated. 

Sets the result of validating the trust of this request

Parameters:
validatedTrust - If this request is valid or not

getIssued

public java.util.Date getIssued()
Returns the date this request was issued


setIssued

public void setIssued(java.util.Date issued)
Sets the date this request is being issued (Issue Instant)