orca.manage.extensions.standard.actors
Class ActorManagerObject

java.lang.Object
  extended by orca.manage.extensions.api.ManagerObject
      extended by orca.manage.extensions.standard.actors.ActorManagerObject
Direct Known Subclasses:
AgentManagerObject, AuthorityManagerObject, ServiceManagerManagerObject

public class ActorManagerObject
extends ManagerObject

Base class for actor manager objects. This class provides management functions that are common among all actor types. Actor-specific functionality should be placed in classes deriving from this class.


Field Summary
protected  IActor actor
          The actor represented by this wrapper.
protected  IDatabase db
          The actor database object.
 
Fields inherited from class orca.manage.extensions.api.ManagerObject
id, logger, manager, PropertyActorName, PropertyClassName, PropertyID, PropertyProxiesClass, PropertyProxiesLength, PropertyProxiesPrefix, PropertyProxiesProtocol, PropertyTypeID, proxies, serial, typeID
 
Constructor Summary
ActorManagerObject()
          Create a new default instance.
ActorManagerObject(IActor actor)
          Create a new instance representing the specified actor
 
Method Summary
 ResultMng addReservation(ReservationMng reservation, AuthToken caller)
          Adds a reservation to the specified slice
 ResultSliceMng addSlice(SliceMng slice, AuthToken caller)
          Creates an inventory slice.
 ResultMng closeReservation(ReservationID reservationID, AuthToken caller)
          Closes the specified reservation
 ResultMng extendReservation(ReservationMng reservation, AuthToken caller)
          Extends the specified reservation
 IActor getActor()
          Returns the actor associated with this wrapper
 java.lang.String getActorName()
          Returns the name of the actor the object is associated with, if any.
 ResultReservationMng getHoldings(AuthToken caller)
          Retrieves this actor's holdings
 ResultSliceMng getInventorySlices(AuthToken caller)
          Retrieves the inventory slices of this actor
 java.lang.String getPolicyClass()
          Returns the class of the policy implementation
 ResultReservationMng getReservation(ReservationID reservationID, AuthToken caller)
          Retrieves the specified reservation
protected  ResourceReservation getReservationFromDatabase(ReservationID reservationID)
          Retrieves the specified reservation from the database
protected  ReservationID getReservationID(ResourceReservation r)
          Returns the correct reservation identifier to use for management operations
 ResultReservationMng getReservations(AuthToken caller)
          Retrieves all reservations
 ResultReservationMng getReservations(SliceID sliceID, AuthToken caller)
          Retrieves all reservations in the specified slice
 ResultSliceMng getSlice(SliceID sliceID, AuthToken caller)
          Retrieves the specified slice
 ResultSliceMng getSlices(AuthToken caller)
          Retrieves all slices
protected  void recover()
          Performs recovery for this manager object
protected  void registerProtocols()
          Register all communication protocols this object supports
 ResultMng removeReservation(ReservationID reservationID, AuthToken caller)
          Removes the specified reservation
 ResultMng removeSlice(SliceID sliceID, AuthToken caller)
          Removes the specified slice.
 void setActor(IActor actor)
          Attach the actor to this wrapper.
 ResultMng updateSlice(SliceMng slice, AuthToken caller)
          Updates the specified slice
 
Methods inherited from class orca.manage.extensions.api.ManagerObject
getID, getProxies, getStackTraceString, getTypeID, initialize, loadProtocols, reset, save, save, saveProtocols, setExceptionDetails
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

actor

protected IActor actor
The actor represented by this wrapper.


db

protected IDatabase db
The actor database object.

Constructor Detail

ActorManagerObject

public ActorManagerObject()
Create a new default instance.


ActorManagerObject

public ActorManagerObject(IActor actor)
Create a new instance representing the specified actor

Parameters:
actor - The actor to be represented
Method Detail

registerProtocols

protected void registerProtocols()
Description copied from class: ManagerObject
Register all communication protocols this object supports

Overrides:
registerProtocols in class ManagerObject

recover

protected void recover()
                throws java.lang.Exception
Performs recovery for this manager object

Overrides:
recover in class ManagerObject
Throws:
java.lang.Exception

setActor

public void setActor(IActor actor)
Attach the actor to this wrapper. Called at construction time.

Parameters:
actor -

getSlices

public ResultSliceMng getSlices(AuthToken caller)
Retrieves all slices


getInventorySlices

public ResultSliceMng getInventorySlices(AuthToken caller)
Retrieves the inventory slices of this actor

Returns:

getSlice

public ResultSliceMng getSlice(SliceID sliceID,
                               AuthToken caller)
Retrieves the specified slice

Parameters:
sliceID - sliceName
Returns:

addSlice

public ResultSliceMng addSlice(SliceMng slice,
                               AuthToken caller)
Creates an inventory slice. Generates a new slice identifier. The generated identifier will be included in the result object.

Parameters:
slice - slice definition
caller - caller identity
Returns:
result object

removeSlice

public ResultMng removeSlice(SliceID sliceID,
                             AuthToken caller)
Removes the specified slice.

Parameters:
sliceID - slice identifier.
caller - caller identity
Returns:

updateSlice

public ResultMng updateSlice(SliceMng slice,
                             AuthToken caller)
Updates the specified slice

Parameters:
slice - Slice description
Returns:

getHoldings

public ResultReservationMng getHoldings(AuthToken caller)
Retrieves this actor's holdings


getReservations

public ResultReservationMng getReservations(AuthToken caller)
Retrieves all reservations

Returns:

getReservations

public ResultReservationMng getReservations(SliceID sliceID,
                                            AuthToken caller)
Retrieves all reservations in the specified slice

Parameters:
sliceName - Slice name
Returns:

getReservation

public ResultReservationMng getReservation(ReservationID reservationID,
                                           AuthToken caller)
Retrieves the specified reservation

Parameters:
reservationID - reservation identifier
Returns:

addReservation

public ResultMng addReservation(ReservationMng reservation,
                                AuthToken caller)
Adds a reservation to the specified slice

Parameters:
reservation - Reservation description
Returns:

getReservationID

protected ReservationID getReservationID(ResourceReservation r)
Returns the correct reservation identifier to use for management operations

Parameters:
r -
Returns:

getReservationFromDatabase

protected ResourceReservation getReservationFromDatabase(ReservationID reservationID)
                                                  throws java.lang.Exception
Retrieves the specified reservation from the database

Parameters:
reservationID - reservation identifier
Returns:
Throws:
java.lang.Exception

removeReservation

public ResultMng removeReservation(ReservationID reservationID,
                                   AuthToken caller)
Removes the specified reservation

Parameters:
reservationID - reservation identifier
Returns:

closeReservation

public ResultMng closeReservation(ReservationID reservationID,
                                  AuthToken caller)
Closes the specified reservation

Parameters:
sliceName - Slice name
reservationID - Reservation id
Returns:

extendReservation

public ResultMng extendReservation(ReservationMng reservation,
                                   AuthToken caller)
Extends the specified reservation

Parameters:
sliceName - Slice name
reservation - Reservation details
Returns:

getActor

public IActor getActor()
Returns the actor associated with this wrapper


getPolicyClass

public java.lang.String getPolicyClass()
Returns the class of the policy implementation

Returns:

getActorName

public java.lang.String getActorName()
Description copied from class: ManagerObject
Returns the name of the actor the object is associated with, if any.

Overrides:
getActorName in class ManagerObject
Returns:
actor name. Can be null.


Copyright © 2007 Network/Internet Computing Lab. All Rights Reserved.