catnet.resource
Class Resource

java.lang.Object
  |
  +--drcl.DrclObj
        |
        +--drcl.comp.Component
              |
              +--drcl.net.Module
                    |
                    +--drcl.inet.application.SUDPApplication
                          |
                          +--catnet.agent.Agent_Source
                                |
                                +--catnet.resource.Resource
All Implemented Interfaces:
java.lang.Cloneable, drcl.ObjectDuplicable, java.io.Serializable

public class Resource
extends Agent_Source

Description of the Class

See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class drcl.comp.Component
drcl.comp.Component.LockPack
 
Field Summary
 
Fields inherited from class catnet.agent.Agent_Source
executionState, id_, IDLE, LOCALHP, MAX, money_balance, NEGOTIATING, negotiations, ownID, strategy
 
Fields inherited from class drcl.net.Module
address, downPort, PortGroup_DOWN, PortGroup_UP, timerPort, upPort
 
Fields inherited from class drcl.comp.Component
FLAG_COMPONENT_NOTIFICATION, FLAG_DEBUG_ENABLED, FLAG_DIRECT_OUTPUT_ENABLED, FLAG_ENABLED, FLAG_ERROR_ENABLED, FLAG_EVENT_ENABLED, FLAG_GARBAGE_DISPLAY_ENABLED, FLAG_GARBAGE_ENABLED, FLAG_PORT_NOTIFICATION, FLAG_STARTED, FLAG_STOPPED, FLAG_TRACE_ENABLED, FLAG_UNDEFINED_START, id, infoPort, lockHead, name, parent, PortGroup_DEFAULT_GROUP, PortGroup_EVENT, PortGroup_SERVICE, Root, Trace_DATA, Trace_SEND
 
Constructor Summary
Resource()
          Constructor for the Resource object
Resource(java.lang.String id_)
          Constructor for the Resource object
 
Method Summary
 void doAccept_ServiceCopy(Msg msg)
          Description of the Method
 int doAllocateStorage(Msg msg)
          Description of the Method
 void doApproveProvideService_ServiceCopy(Msg msg)
          Description of the Method
 void doBWAllocation_LocalServiceCopy(Msg msg)
          Description of the Method
 void doCfp_ServiceCopy(Msg msg)
          Description of the Method
 void doPayment_ServiceCopy(Msg msg)
          Description of the Method
 int getPrice()
          Gets the price attribute of the Agent_Source object
protected  void postAcceptanceMethod()
          to be implemented in derived classes. defines what to do with the acceptance.
protected  void postRejectanceMethod()
          Description of the Method
 void setInitialServiceCopiesatResource(int n, long[] res)
          Sets the initialServiceCopiesatResource attribute of the Resource object
 void setPrice(int price)
          Sets the price attribute of the Agent_Source object
 
Methods inherited from class catnet.agent.Agent_Source
checkRestrictions, dataArriveAtDownPort, doAccept_Client, doAllocateBW, doAnswerBWAllocation_LocalResource, doAnswerC_Client, doCfpAnswer_Resource, doCfpC_Client, doCfpCAnswer_ServiceCopy, doConfirm_Resource, doConfirm_Servicecopy, doInform_Resource, doPayment_Client, doProvideService_Resource, doRequestResource_Client, goMsg_Dest, interpretAccept, interpretCfp, interpretProposal, interpretReject, setHP, timeout
 
Methods inherited from class drcl.inet.application.SUDPApplication
getContent, getPeerAddress, getPeerPort, info, open, open, processOther, recvmsg, recvmsg, recvmsg, reset, sendmsg, sendmsg, sendmsg, sendmsg, sendmsg, sendreceive, sendreceive, sendreceive, sendreceive, sendreceive
 
Methods inherited from class drcl.net.Module
cancelTimeout, dataArriveAtUpPort, deliver, duplicate, getAddress, process, removeDefaultDownPort, removeDefaultUpPort, removeTimerPort, setAddress, setTimeout, setTimeoutAt
 
Methods inherited from class drcl.comp.Component
_resume, _start, _stop, addComponent, addComponent, addEventPort, addEventPort, addForkPort, addPort, addPort, addPort, addPort, addPort, addPort, addPort, addPort, addServerPort, addServerPort, cancelFork, componentAdded, componentRemoved, connect, containsComponent, containsComponent, containsPort, debug, disconnectAll, disconnectAllPeers, disconnectAllPorts, drop, drop, error, error, expose, exposeEventPorts, exposePort, exposePort, exposePort, exposePort, exposePort, findAvailable, findAvailable, findAvailable, finishing, fork, forkAt, getAllComponents, getAllPorts, getAllPorts, getAllWiresInside, getAllWiresInsideOut, getAllWiresOut, getComponent, getComponentFlag, getComponentFlag, getContract, getContractHT, getContractHT, getDebugFlagsInBinary, getDebugLevelNames, getForkManager, getID, getName, getParent, getPort, getPort, getRoot, getRuntime, getTime, iduplicate, isAncestorOf, isComponentNotificationEnabled, isContainer, isDebugEnabled, isDebugEnabledAt, isDirectOutputEnabled, isEnabled, isErrorNoticeEnabled, isEventExportEnabled, isGarbageDisplayEnabled, isGarbageEnabled, isPortNotificationEnabled, isPortRemovable, isStarted, isStopped, isTraceEnabled, lock, notify, notifyAll, operate, portAdded, portRemoved, reboot, removeAll, removeAllComponents, removeAllPorts, removeAllPorts, removeComponent, removeComponent, removePort, removePort, removePort, resume, run, sduplicate, send, sendAt, setComponentFlag, setComponentFlag, setComponentNotificationEnabled, setContract, setDebugEnabled, setDebugEnabled, setDebugEnabledAt, setDebugEnabledAt, setDebugEnabledAt, setDirectOutputEnabled, setDirectOutputEnabled, setEnabled, setErrorNoticeEnabled, setErrorNoticeEnabled, setEventExportEnabled, setEventExportEnabled, setExecutionBoundary, setGarbageDisplayEnabled, setGarbageDisplayEnabled, setGarbageEnabled, setGarbageEnabled, setID, setID, setName, setPort, setPort, setPortNotificationEnabled, setPortRemovable, setRuntime, setTraceEnabled, setTraceEnabled, sleepFor, sleepUntil, stop, toString, unexpose, unlock, useLocalForkManager, useLocalForkManager, wait
 
Methods inherited from class drcl.DrclObj
clone
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Resource

public Resource()
Constructor for the Resource object


Resource

public Resource(java.lang.String id_)
Constructor for the Resource object

Parameters:
id_ - Description of the Parameter
Method Detail

setInitialServiceCopiesatResource

public void setInitialServiceCopiesatResource(int n,
                                              long[] res)
Sets the initialServiceCopiesatResource attribute of the Resource object

Parameters:
n - The new initialServiceCopiesatResource value
res - The new initialServiceCopiesatResource value

doCfp_ServiceCopy

public void doCfp_ServiceCopy(Msg msg)
Description of the Method

Overrides:
doCfp_ServiceCopy in class Agent_Source
Parameters:
msg - Description of the Parameter

doAccept_ServiceCopy

public void doAccept_ServiceCopy(Msg msg)
Description of the Method

Overrides:
doAccept_ServiceCopy in class Agent_Source
Parameters:
msg - Description of the Parameter

doAllocateStorage

public int doAllocateStorage(Msg msg)
Description of the Method

Overrides:
doAllocateStorage in class Agent_Source
Parameters:
msg - Description of the Parameter
Returns:
Description of the Return Value

doApproveProvideService_ServiceCopy

public void doApproveProvideService_ServiceCopy(Msg msg)
Description of the Method

Overrides:
doApproveProvideService_ServiceCopy in class Agent_Source
Parameters:
msg - Description of the Parameter

doBWAllocation_LocalServiceCopy

public void doBWAllocation_LocalServiceCopy(Msg msg)
Description of the Method

Overrides:
doBWAllocation_LocalServiceCopy in class Agent_Source
Parameters:
msg - Description of the Parameter

doPayment_ServiceCopy

public void doPayment_ServiceCopy(Msg msg)
Description of the Method

Overrides:
doPayment_ServiceCopy in class Agent_Source
Parameters:
msg - Description of the Parameter

getPrice

public int getPrice()
Gets the price attribute of the Agent_Source object

Overrides:
getPrice in class Agent_Source
Returns:
The price value

setPrice

public void setPrice(int price)
Sets the price attribute of the Agent_Source object

Overrides:
setPrice in class Agent_Source
Parameters:
price - The new price value

postAcceptanceMethod

protected void postAcceptanceMethod()
to be implemented in derived classes. defines what to do with the acceptance.

Specified by:
postAcceptanceMethod in class Agent_Source

postRejectanceMethod

protected void postRejectanceMethod()
Description copied from class: Agent_Source
Description of the Method

Specified by:
postRejectanceMethod in class Agent_Source