|
SmartFrog 3.10.000 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.smartfrog.sfcore.reference.RemoteReferenceResolverHelperImpl
org.smartfrog.sfcore.prim.PrimImpl
org.smartfrog.examples.counter.CounterImpl
public class CounterImpl
Basic example component. The Counter component (in components.sf) is a basic primitive component so its component description class CounterImpl extends PrimImpl (the base class for all the deployed components) which provides the default lifecycle template methods for a primitive component. Although PrimImpl itself implements Prim (the base interface for all the deployed components) CounterImpl also implements Prim because it is necessary for RMI that component also does so; the rmic compiler will otherwise not behave correctly. The CounterImpl class needs to be prepared for RMI for remote deployment This is done by creating and compiling the stubs and skeletons using the rmic compiler. This class is included in rmitargets that is read by the rmic compiler.
| Field Summary | |
|---|---|
protected java.lang.Thread |
action
Thread object |
protected int |
counter
Counter component data - counter. |
protected boolean |
debug
Shows debug messages. |
protected int |
limit
Counter component data - limit. |
protected LogSF |
logApp
|
protected LogSF |
logCore
|
protected java.lang.String |
message
Counter component data - message. |
protected java.lang.String |
myName
Component name used for debug messages. |
protected boolean |
pause
Should pause during sfDeploy and sfStart? |
protected int |
sleeptime
sleep time |
protected boolean |
terminate
Terminates component when counter reaches limit |
| Fields inherited from class org.smartfrog.sfcore.prim.PrimImpl |
|---|
refLivenessDelay, refLivenessFactor, sfCompleteName, sfContext, sfDeployHooks, sfDeployWithHooks, sfExportRef, sfIsDeployed, sfIsStarted, sfIsTerminated, sfIsTerminating, sfLivenessCount, sfLivenessDelay, sfLivenessFactor, sfLivenessSender, sfParent, sfStartHooks, sfTerminateWithHooks, termLock |
| Fields inherited from interface org.smartfrog.examples.counter.Counter |
|---|
ATR_COUNTER, ATR_DEBUG, ATR_LIMIT, ATR_MESSAGE, ATR_PAUSE, ATR_SLEEP, ATR_TERMINATE |
| Constructor Summary | |
|---|---|
CounterImpl()
Constructor for the Counter object. |
|
| Method Summary | |
|---|---|
protected void |
readSFAttributes()
Reads optional and mandatory attributes. |
void |
run()
Main processing method for the Counter object (implements 'Runnable'). |
void |
sfDeploy()
sfDeploy: reads Counter attributes and configures counter thread The superclass implementation of sfDeploy is called before the component specific initialization code (reading Counter attributes and configuring counter thread) to maintain correct behaviour of initial deployment and starting the heartbeat monitoring of this component. |
void |
sfStart()
sfStart: starts counter thread. |
void |
sfTerminateWith(TerminationRecord t)
sfTerminate: The superclass implementation of sfTerminateWith is called after the component specific termination code to implement useful termination behaviour of the component. |
| Methods inherited from class org.smartfrog.sfcore.reference.RemoteReferenceResolverHelperImpl |
|---|
sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolveWithParser |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.smartfrog.sfcore.prim.Prim |
|---|
sfAddAttribute, sfAttributeKeyFor, sfAttributes, sfCompleteName, sfContainsAttribute, sfContainsValue, sfContext, sfDeployedHost, sfDeployedProcessName, sfDeployWith, sfDetach, sfDetachAndTerminate, sfDumpState, sfIsDeployed, sfIsStarted, sfIsTerminated, sfIsTerminating, sfParent, sfParentageChanged, sfRemoveAttribute, sfReplaceAttribute, sfTerminate, sfTerminatedWith, sfTerminateQuietlyWith, sfValues |
| Methods inherited from interface org.smartfrog.sfcore.prim.Liveness |
|---|
sfPing |
| Methods inherited from interface org.smartfrog.sfcore.reference.RemoteReferenceResolver |
|---|
sfResolve, sfResolve, sfResolveHere, sfResolveHere, sfResolveParent |
| Methods inherited from interface org.smartfrog.sfcore.reference.RemoteReferenceResolverHelper |
|---|
sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolveWithParser |
| Methods inherited from interface org.smartfrog.sfcore.prim.Diagnostics |
|---|
sfDiagnosticsReport |
| Field Detail |
|---|
protected int counter
protected java.lang.String message
protected int limit
protected java.lang.Thread action
protected int sleeptime
protected LogSF logCore
protected LogSF logApp
protected boolean debug
protected boolean pause
protected boolean terminate
protected java.lang.String myName
| Constructor Detail |
|---|
public CounterImpl()
throws java.rmi.RemoteException
java.rmi.RemoteException - In case of network/rmi error| Method Detail |
|---|
public void sfDeploy()
throws SmartFrogException,
java.rmi.RemoteException
sfDeploy in interface PrimsfDeploy in class PrimImplSmartFrogException - In case of error in deploying
java.rmi.RemoteException - In case of network/rmi error
public void sfStart()
throws SmartFrogException,
java.rmi.RemoteException
sfStart in interface PrimsfStart in class PrimImplSmartFrogException - In case of error while starting
java.rmi.RemoteException - In case of network/rmi errorpublic void sfTerminateWith(TerminationRecord t)
sfTerminateWith in class PrimImplt - TerminationRecord object
protected void readSFAttributes()
throws SmartFrogException,
java.rmi.RemoteException
SmartFrogException - error while reading attributes
java.rmi.RemoteException - In case of network/rmi errorpublic void run()
run in interface java.lang.Runnable
|
SmartFrog CORE 3.10.000 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||