uk.org.ogsadai.dataresource.config
Class DataServiceInfo

java.lang.Object
  |
  +--uk.org.ogsadai.dataresource.config.DataServiceInfo

public class DataServiceInfo
extends java.lang.Object

This class provides information about the data services that are going to use this accessor as well as the data resources from which information is to be retrieved.

The information is set up using an XML fragment from a data resource configuration document. Specifically the vlaues of all child elements of unitDataServiceConfig are manipulated. Methods to set and get these values are provided.

Author:
The OGSA-DAI Project Team.

Field Summary
private static java.lang.String COPYRIGHT_NOTICE
          Copyright statement
private static DAILogger LOG
          Logger object for logging in this class
private  long mDefaultTimeOut
          Default timeout within a response should be returned by one of the data resources
private  java.lang.String mDrId
          the name of the data service resource of the above data service being able to be contacted by the multiple data service resource though SQLMultipleActivity
private  java.lang.String mDsDescription
          description of the data resource being exposed by one of the above data service resources.
private  java.lang.String mDsUrl
          the url of one of the data services being able to be contacted by the multiple data service resource through the SQLMultipleActivity
private  java.lang.String mLastResponse
          Indicates the status of last call to this data service.
private  long mMaximumTimeOut
          Maximum timeout within a response should be returned by one of the data resources
static java.lang.String NOT_AVAILABLE
          constant used the response is, for some reason, not available
static java.lang.String RESPONSE_ERROR
          constant used when an error occured in the response
static java.lang.String RESPONSE_OK
          constant used when the response was ok
static java.lang.String RESPONSE_TIMEOUT
          constant used when the response timed out
 
Constructor Summary
DataServiceInfo()
          Constructor of the class.
 
Method Summary
 void configure(org.w3c.dom.Element dsElement)
          Strips out the required information from the XML document.
 long getDefaultTimeOut()
          get the default timeout
 java.lang.String getDrId()
          get the id of the data resource
 java.lang.String getDsDescription()
          get the description
 java.lang.String getDsUrl()
          get the URL of the data service
 java.lang.String getLastResponse()
           
 long getMaximumTimeOut()
          get the maximun timeout
 void setDefaultTimeOut(long timeout)
          set the defualt timeout
 void setDrId(java.lang.String id)
          set the data resource ID
 void setDsDescription(java.lang.String desc)
          set the description
 void setDsUrl(java.lang.String url)
          set the Data service URL
 void setLastResponse(java.lang.String lastResponse)
           
 void setMaximumTimeOut(long timeout)
          set the maximum timeout
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COPYRIGHT_NOTICE

private static final java.lang.String COPYRIGHT_NOTICE
Copyright statement

See Also:
Constant Field Values

RESPONSE_OK

public static final java.lang.String RESPONSE_OK
constant used when the response was ok

See Also:
Constant Field Values

RESPONSE_ERROR

public static final java.lang.String RESPONSE_ERROR
constant used when an error occured in the response

See Also:
Constant Field Values

RESPONSE_TIMEOUT

public static final java.lang.String RESPONSE_TIMEOUT
constant used when the response timed out

See Also:
Constant Field Values

NOT_AVAILABLE

public static final java.lang.String NOT_AVAILABLE
constant used the response is, for some reason, not available

See Also:
Constant Field Values

mDsUrl

private java.lang.String mDsUrl
the url of one of the data services being able to be contacted by the multiple data service resource through the SQLMultipleActivity


mDrId

private java.lang.String mDrId
the name of the data service resource of the above data service being able to be contacted by the multiple data service resource though SQLMultipleActivity


mDsDescription

private java.lang.String mDsDescription
description of the data resource being exposed by one of the above data service resources.


mDefaultTimeOut

private long mDefaultTimeOut
Default timeout within a response should be returned by one of the data resources


mMaximumTimeOut

private long mMaximumTimeOut
Maximum timeout within a response should be returned by one of the data resources


mLastResponse

private java.lang.String mLastResponse
Indicates the status of last call to this data service. Client could know if data from a specific data service has been included in the merged result of multiple data services through getting a dynamic property which reads info here.


LOG

private static DAILogger LOG
Logger object for logging in this class

Constructor Detail

DataServiceInfo

public DataServiceInfo()
Constructor of the class. All variables describing the data service resources being contacted by the multiple data service resource.

Method Detail

getDsUrl

public java.lang.String getDsUrl()
get the URL of the data service


getDrId

public java.lang.String getDrId()
get the id of the data resource


getDsDescription

public java.lang.String getDsDescription()
get the description


getDefaultTimeOut

public long getDefaultTimeOut()
get the default timeout


getMaximumTimeOut

public long getMaximumTimeOut()
get the maximun timeout


setDsUrl

public void setDsUrl(java.lang.String url)
set the Data service URL


setDrId

public void setDrId(java.lang.String id)
set the data resource ID


setDsDescription

public void setDsDescription(java.lang.String desc)
set the description


setDefaultTimeOut

public void setDefaultTimeOut(long timeout)
set the defualt timeout


setMaximumTimeOut

public void setMaximumTimeOut(long timeout)
set the maximum timeout


configure

public void configure(org.w3c.dom.Element dsElement)
               throws java.lang.IllegalArgumentException
Strips out the required information from the XML document.

Parameters:
dsElement - the element to be parsed
Throws:
java.lang.IllegalArgumentException - if dsElement is null or is not a UnitDataServiceConfig element.

getLastResponse

public java.lang.String getLastResponse()
Returns:
Returns the lastResponse.

setLastResponse

public void setLastResponse(java.lang.String lastResponse)
Parameters:
lastResponse - The lastResponse to set.