org.iids.aos.hostmanager.negotiationmodule.resourcehandlers
Class AbstractResourceHandler

java.lang.Object
  extended by org.iids.aos.hostmanager.negotiationmodule.resourcehandlers.AbstractResourceHandler
All Implemented Interfaces:
java.lang.Runnable, BasicResourceHandler
Direct Known Subclasses:
CPUResourceHandler, runtimeResourceHandler

public abstract class AbstractResourceHandler
extends java.lang.Object
implements BasicResourceHandler, java.lang.Runnable


Nested Class Summary
static class AbstractResourceHandler.ViolationAlarm
           
 
Field Summary
static int STATUS_ACTIVE
           
static int STATUS_INITIALIZED
           
static int STATUS_RESERVED
           
static int STATUS_VIOLATED
           
 
Constructor Summary
protected AbstractResourceHandler(java.lang.String handlerID, AgentScapeID providerID, java.lang.String serviceName)
           
 
Method Summary
 java.lang.String getHandlerID()
           
abstract  java.lang.Object getMonitorValue(java.lang.Integer descriptor)
           
 AgentScapeID getProviderID()
           
 java.lang.String getServiceName()
           
abstract  int getStatus(int refID)
           
abstract  void implement(int refID, AlarmQueue violationQueue)
           
 boolean isRunning()
           
abstract  void release(int refID)
           
abstract  int reserve(AgreementOffer request)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.lang.Runnable
run
 

Field Detail

STATUS_ACTIVE

public static final int STATUS_ACTIVE
See Also:
Constant Field Values

STATUS_VIOLATED

public static final int STATUS_VIOLATED
See Also:
Constant Field Values

STATUS_RESERVED

public static final int STATUS_RESERVED
See Also:
Constant Field Values

STATUS_INITIALIZED

public static final int STATUS_INITIALIZED
See Also:
Constant Field Values
Constructor Detail

AbstractResourceHandler

protected AbstractResourceHandler(java.lang.String handlerID,
                                  AgentScapeID providerID,
                                  java.lang.String serviceName)
Method Detail

isRunning

public boolean isRunning()

getHandlerID

public java.lang.String getHandlerID()
Specified by:
getHandlerID in interface BasicResourceHandler

getProviderID

public AgentScapeID getProviderID()
Specified by:
getProviderID in interface BasicResourceHandler

getServiceName

public java.lang.String getServiceName()
Specified by:
getServiceName in interface BasicResourceHandler

getMonitorValue

public abstract java.lang.Object getMonitorValue(java.lang.Integer descriptor)
                                          throws MonitorException
Specified by:
getMonitorValue in interface BasicResourceHandler
Throws:
MonitorException

getStatus

public abstract int getStatus(int refID)
                       throws HandlerException
Specified by:
getStatus in interface BasicResourceHandler
Throws:
HandlerException

reserve

public abstract int reserve(AgreementOffer request)
                     throws ReservationException
Specified by:
reserve in interface BasicResourceHandler
Throws:
ReservationException

implement

public abstract void implement(int refID,
                               AlarmQueue violationQueue)
                        throws HandlerException
Specified by:
implement in interface BasicResourceHandler
Throws:
HandlerException

release

public abstract void release(int refID)
                      throws HandlerException
Specified by:
release in interface BasicResourceHandler
Throws:
HandlerException


Copyright © 2003, 2004 IIDS Group. All Rights Reserved.