|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorca.shirako.plugins.ShirakoPlugin
public class ShirakoPlugin
The base implementation for actor-specific extensions. All such extensions should inherit from this class.
| Field Summary | |
|---|---|
protected IActor |
actor
The actor the plugin is associated with |
protected Config |
config
The configuration |
protected IDatabase |
db
The database |
protected java.util.Hashtable<java.lang.String,ConcreteSetFactory> |
factories
Concrete set factories indexed by protocol |
protected KeystoreManager |
keystoreManager
The keystore manager. |
protected LoggingTool |
logger
The logger |
static java.lang.String |
PropertyConfig
|
static java.lang.String |
PropertyConfigClass
|
static java.lang.String |
PropertyDatabase
|
static java.lang.String |
PropertyDatabaseClass
|
| Constructor Summary | |
|---|---|
ShirakoPlugin()
|
|
ShirakoPlugin(Actor actor,
IDatabase db,
Config config)
Create a new BasePlugin |
|
| Method Summary | |
|---|---|
void |
actorAdded()
Performs initialization steps knowing that the actor has beena added to the container. |
void |
configurationComplete(java.lang.Object token,
java.util.Properties properties)
Configuration callback function. |
Slice |
createSlice(SliceID id,
java.lang.String name,
ResourceData properties,
java.lang.Object other)
Slice factory. |
IActor |
getActor()
Returns the actor associated with the plugin. |
Config |
getConfig()
|
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. |
protected int |
getResultCode(java.util.Properties properties)
Returns the status code contained in the properties list. |
void |
initialize()
Initialization entry point |
void |
initializeKeyStore(IActor actor)
Initializes the actor key store. |
protected void |
loadFactories()
Populates the factories list. |
protected void |
processJoinComplete(java.lang.Object token,
java.util.Properties properties)
Callback handler for a completing join request |
protected void |
processLeaveComplete(java.lang.Object token,
java.util.Properties properties)
Callback handler for a completing leave request. |
protected void |
processModifyComplete(java.lang.Object token,
java.util.Properties properties)
|
protected void |
processProbeComplete(java.lang.Object token,
java.util.Properties properties)
Callback handler for a completing probe request |
protected void |
processRecoverComplete(java.lang.Object token,
java.util.Properties properties)
Callback handler for a completing recover crequest |
void |
releaseSlice(Slice slice)
Releases any resources held by the slice. |
void |
reset()
Refreshes the actor |
void |
reset(java.util.Properties p)
De-serializes the object from the given properties list. |
void |
restartConfigurationActions(ResourceReservation r)
Restarts any pending configuration actions for the specified reservation |
void |
revisit(IActor actor,
java.util.Properties p)
Recovers state of the component using a previously saved properties list and a references to the actor this component belongs to. |
void |
revisit(ResourceReservation r)
Reset/restore interface. |
void |
revisit(Slice s)
Reset/restore interface. |
java.util.Properties |
save()
Serializes the object into a properties list. |
void |
save(java.util.Properties p)
Serializes the object into the given properties list. |
void |
setActor(IActor actor)
Sets the actor. |
void |
setConfig(Config config)
|
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 |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String PropertyConfig
public static final java.lang.String PropertyConfigClass
public static final java.lang.String PropertyDatabase
public static final java.lang.String PropertyDatabaseClass
protected IActor actor
protected Config config
protected IDatabase db
protected LoggingTool logger
protected KeystoreManager keystoreManager
protected java.util.Hashtable<java.lang.String,ConcreteSetFactory> factories
| Constructor Detail |
|---|
public ShirakoPlugin()
public ShirakoPlugin(Actor actor,
IDatabase db,
Config config)
BasePlugin
actor - The actor this plugin is related todb - Database to useconfig - Configuration manager to use| Method Detail |
|---|
public void initialize()
throws java.lang.Exception
initialize in interface IInitializejava.lang.Exception
public void actorAdded()
throws java.lang.Exception
IShirakoPlugin
actorAdded in interface IShirakoPluginjava.lang.Exception
public void initializeKeyStore(IActor actor)
throws java.lang.Exception
IShirakoPlugin
initializeKeyStore in interface IShirakoPluginjava.lang.Exception
public void restartConfigurationActions(ResourceReservation r)
throws java.lang.Exception
IShirakoPlugin
restartConfigurationActions in interface IShirakoPluginr - reservation
java.lang.Exception
protected void loadFactories()
throws java.lang.Exception
java.lang.Exceptionpublic IConcreteSetFactory getFactory(java.lang.String protocol)
IConcreteSetFactory for the given communication
protocol
getFactory in interface IShirakoPluginprotocol - communication protocol. IProxy
IConcreteSet
instances
public void configurationComplete(java.lang.Object token,
java.util.Properties properties)
token - Unique opaque token to identify the completed operationproperties - Output properties list produced by the configuration
action.
protected void processJoinComplete(java.lang.Object token,
java.util.Properties properties)
token - properties -
protected void processLeaveComplete(java.lang.Object token,
java.util.Properties properties)
token - properties -
protected void processProbeComplete(java.lang.Object token,
java.util.Properties properties)
token - properties -
protected void processRecoverComplete(java.lang.Object token,
java.util.Properties properties)
token - properties -
protected void processModifyComplete(java.lang.Object token,
java.util.Properties properties)
protected int getResultCode(java.util.Properties properties)
properties -
public Slice createSlice(SliceID id,
java.lang.String name,
ResourceData properties,
java.lang.Object other)
throws java.lang.Exception
createSlice in interface IShirakoPluginid - guid for the slicename - name for the sliceproperties - properties for the sliceother - other relevant information
java.lang.Exception
public void releaseSlice(Slice slice)
throws java.lang.Exception
IShirakoPlugin
releaseSlice in interface IShirakoPluginslice - the slice
java.lang.Exception
public void reset()
throws java.lang.Exception
reset in interface IShirakoPluginjava.lang.Exception
public void revisit(Slice s)
throws java.lang.Exception
revisit in interface IShirakoPlugins - restored slice
java.lang.Exception
public void revisit(ResourceReservation r)
throws java.lang.Exception
revisit in interface IShirakoPluginr - restored reservation
java.lang.Exception
public boolean validateIncoming(IReservation reservation,
AuthToken auth)
validateIncoming in interface IShirakoPluginreservation - The reservationauth - AuthToken of the caller
public java.util.Properties save()
throws java.lang.Exception
ISerialize
save in interface ISerializejava.lang.Exception
public void save(java.util.Properties p)
throws java.lang.Exception
ISerialize
save in interface ISerializep - properties list to serialize the object into
java.lang.Exception
public void reset(java.util.Properties p)
throws java.lang.Exception
ISerialize
reset in interface ISerializep - properties list containing the serialized version of
the object
java.lang.Exception
public void revisit(IActor actor,
java.util.Properties p)
throws java.lang.Exception
IRecover
revisit in interface IRecoveractor - actor object the component belongs top - properties list containing configuration data about the
component
java.lang.Exceptionpublic void setActor(IActor actor)
setActor in interface IShirakoPluginactor - the actorpublic IActor getActor()
IShirakoPlugin
getActor in interface IShirakoPluginpublic void setDatabase(IDatabase db)
IShirakoPlugin
setDatabase in interface IShirakoPlugindb - database instancepublic IDatabase getDatabase()
IShirakoPlugin
getDatabase in interface IShirakoPluginpublic void setConfig(Config config)
public Config getConfig()
public void setLogger(LoggingTool logger)
IShirakoPlugin
setLogger in interface IShirakoPluginlogger - instancepublic LoggingTool getLogger()
IShirakoPlugin
getLogger in interface IShirakoPluginpublic KeystoreManager getKeyStore()
IShirakoPlugin
getKeyStore in interface IShirakoPlugin
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||