orca.shirako.api
Interface IShirakoPlugin

All Superinterfaces:
IInitialize, IRecover, ISerialize
All Known Implementing Classes:
CodBasePlugin, ServerPlugin, ServiceManagerCodPlugin, ShirakoPlugin, Site

public interface IShirakoPlugin
extends IInitialize, ISerialize, IRecover

IShirakoPlugin defines the interface for optional plugins (e.g., COD). These methods are upcalled as various events occur. All implementations of this class must have a constructor that takes no arguments, and set methods for their attributes.


Method Summary
 void actorAdded()
          Performs initialization steps knowing that the actor has beena added to the container.
 Slice createSlice(SliceID sliceID, java.lang.String name, ResourceData properties, java.lang.Object other)
          Creates a new slice
 IActor getActor()
          Returns the actor associated with the plugin.
 IDatabase getDatabase()
          Obtains the actor's database instance.
 IConcreteSetFactory getFactory(java.lang.String protocol)
          Returns an IConcreteSetFactory for the given communication protocol
 KeystoreManager getKeyStore()
          Returns the actor keystore manager.
 LoggingTool getLogger()
          Returns the logger.
 void initializeKeyStore(IActor actor)
          Initializes the actor key store.
 void releaseSlice(Slice slice)
          Releases any resources held by the slice.
 void reset()
          Recovers the actor from previously saved state.
 void restartConfigurationActions(ResourceReservation reservation)
          Restarts any pending configuration actions for the specified reservation
 void revisit(ResourceReservation reservation)
          Rebuilds plugin state associated with a restored reservation.
 void revisit(Slice slice)
          Rebuilds plugin state associated with a restored slice.
 void setActor(IActor actor)
          Sets the actor.
 void setDatabase(IDatabase db)
          Sets the actor's database instance.
 void setLogger(LoggingTool logger)
          Sets the logger.
 boolean validateIncoming(IReservation reservation, AuthToken auth)
          Validates an incoming reservation request
 
Methods inherited from interface orca.shirako.api.IInitialize
initialize
 
Methods inherited from interface orca.shirako.api.ISerialize
reset, save, save
 
Methods inherited from interface orca.shirako.api.IRecover
revisit
 

Method Detail

initializeKeyStore

void initializeKeyStore(IActor actor)
                        throws java.lang.Exception
Initializes the actor key store. Called early in the initialization process.

Parameters:
the - actor object (Note that at this stage the plugin itself does not have access to the actor object and the method MUST use the actor object being passed).
Throws:
java.lang.Exception

createSlice

Slice createSlice(SliceID sliceID,
                  java.lang.String name,
                  ResourceData properties,
                  java.lang.Object other)
                  throws java.lang.Exception
Creates a new slice

Parameters:
sliceID - guid for the slice
name - name for the slice
properties - properties for the slice
other - other relevant information
Returns:
a slice object
Throws:
java.lang.Exception

releaseSlice

void releaseSlice(Slice slice)
                  throws java.lang.Exception
Releases any resources held by the slice. Note: the database record will not be removed.

Parameters:
slice - the slice
Throws:
java.lang.Exception

getDatabase

IDatabase getDatabase()
Obtains the actor's database instance.

Returns:
database instance

setDatabase

void setDatabase(IDatabase db)
Sets the actor's database instance.

Parameters:
db - database instance

restartConfigurationActions

void restartConfigurationActions(ResourceReservation reservation)
                                 throws java.lang.Exception
Restarts any pending configuration actions for the specified reservation

Parameters:
reservation - reservation
Throws:
java.lang.Exception

setActor

void setActor(IActor actor)
Sets the actor. Note: the actor has to be fully initialized.

Parameters:
actor - the actor

getActor

IActor getActor()
Returns the actor associated with the plugin.

Returns:
actor associated with the plugin

reset

void reset()
           throws java.lang.Exception
Recovers the actor from previously saved state.

Throws:
java.lang.Exception

revisit

void revisit(Slice slice)
             throws java.lang.Exception
Rebuilds plugin state associated with a restored slice. Called once for each restored slice.

Parameters:
slice - restored slice
Throws:
java.lang.Exception

revisit

void revisit(ResourceReservation reservation)
             throws java.lang.Exception
Rebuilds plugin state associated with a restored reservation. Called once for each restored reservation.

Parameters:
reservation - restored reservation
Throws:
java.lang.Exception

validateIncoming

boolean validateIncoming(IReservation reservation,
                         AuthToken auth)
                         throws java.lang.Exception
Validates an incoming reservation request

Parameters:
reservation - The reservation
auth - AuthToken of the caller
Returns:
True if the validation succeeds
Throws:
java.lang.Exception

setLogger

void setLogger(LoggingTool logger)
Sets the logger.

Parameters:
logger - instance

getLogger

LoggingTool getLogger()
Returns the logger.

Returns:
logger instance

getFactory

IConcreteSetFactory getFactory(java.lang.String protocol)
Returns an IConcreteSetFactory for the given communication protocol

Parameters:
protocol - communication protocol. IProxy
Returns:
factory for encoding/decoding IConcreteSet instances

getKeyStore

KeystoreManager getKeyStore()
Returns the actor keystore manager.

Returns:

actorAdded

void actorAdded()
                throws java.lang.Exception
Performs initialization steps knowing that the actor has beena added to the container.

Throws:
java.lang.Exception


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