ist.palcom.contingency.manager.events.query
Class ResourceQuery

java.lang.Object
  extended by ist.palcom.collections.Link
      extended by ist.palcom.palcomthreads.Event
          extended by ist.palcom.contingency.manager.events.query.Query
              extended by ist.palcom.contingency.manager.events.query.ResourceQuery
Direct Known Subclasses:
DeviceQuery, SameResourceQuery, ServiceQuery

public abstract class ResourceQuery
extends Query

Can be used for two purposes. 1. As a query for a particular resource specified by its URN. In that case the isMonitorRequest flag should be set to false. 2. As a request to monitor a particular resource. In that case the isMonitorRequest flag should be set to true.


Field Summary
protected  boolean shouldBeKept
          Information whether to treat this query as a request to register or unregister a listener for monitoring (relevant only in the case isMonitorRequest is set to true).
 
Fields inherited from class ist.palcom.contingency.manager.events.query.Query
answer, requester
 
Constructor Summary
ResourceQuery(URN urn, PalcomThread requester, boolean isMonitorRequest, boolean shouldBeKept)
           
 
Method Summary
 PRDData getAnswer()
           
 PalcomThread getRequester()
           
 URN getURN()
           
 boolean isMonitorRequest()
           
 boolean isShouldBeKept()
           
 void setAnswer(PRDData answer)
           
 void setMonitorRequest(boolean isMonitorRequest)
           
 void setShouldBeKept(boolean shouldBeKept)
           
 
Methods inherited from class ist.palcom.contingency.manager.events.query.Query
isAnswer, setAnswer
 
Methods inherited from class ist.palcom.collections.Link
getNext, getPrev
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

shouldBeKept

protected boolean shouldBeKept
Information whether to treat this query as a request to register or unregister a listener for monitoring (relevant only in the case isMonitorRequest is set to true).

Constructor Detail

ResourceQuery

public ResourceQuery(URN urn,
                     PalcomThread requester,
                     boolean isMonitorRequest,
                     boolean shouldBeKept)
Method Detail

isShouldBeKept

public boolean isShouldBeKept()

setShouldBeKept

public void setShouldBeKept(boolean shouldBeKept)

getURN

public URN getURN()

getRequester

public PalcomThread getRequester()
Overrides:
getRequester in class Query

getAnswer

public PRDData getAnswer()
Overrides:
getAnswer in class Query

setAnswer

public void setAnswer(PRDData answer)

isMonitorRequest

public boolean isMonitorRequest()

setMonitorRequest

public void setMonitorRequest(boolean isMonitorRequest)