com.vii.brillien.kernel.axiom.atomic
Interface Presence<C extends Communication,R>

All Superinterfaces:
Aspirer<C,R>, Callable<R>, Presence<C,R>, Progressor, Sensor<C>
All Known Subinterfaces:
CharacteristicFunction<P,C,R>, Commander<P,C,R>, Context<P,C,R>, EquivalenceRelation<P,C,R>, Flow<P,C,R>, OrderRelation<P,C,R>, PresenceManager<P,C>, Unit<P,C,R>

public interface Presence<C extends Communication,R>
extends Presence<C,R>

This is the most basic extension of the axiomatic Presence term. It could be considered as the basics for all Brillien implementation.


Field Summary
static int CONSONANT
          Consonant will be instanciated in every process meaning different transaction id.
static int RESIDENT
          Singleton will be made only once.
static int SPARKLE
          Sparklink will be instantiated in every incoming communication
 
Method Summary
 void activateAll()
          Activates all activity of the Presence (messaging, aspiring).
 void addSuperUnits(Unit... ses)
          Adds new superunits.
 void clearSuperUnits()
          Clears all subunits
 String getApiKeyPresenceName()
          Gets the name of the presence providing API_KEY functionality
 Flow getFlow()
          Gets the flow referece of the Presence.
 String getFlowID()
          Gets the flow ID of the Presence.
 PresenceManager getPresenceManager()
          Getter method for the instantiating manager for that component
<S> S
getSharing(Object key)
          Tries to retrieve a shared Resource.
 String getSSOPresenceName()
          Gets the name of the Presence providing SSO functionality
 Collection<Unit> getSuperUnits()
          Gets superunits instances.
 void passivateAll()
          Passivates all activity of the Presence (messaging, aspiring).
 String printErrorStates()
           
 void removeSuperUnits(Unit... ses)
          Removes superunits.
 void retrieve()
          Makes this presence to be retrieved by the proper Presencemanager
 void setFlow(Flow flow)
          Sets the flow ID of the Presence.
 void setPresenceManager(PresenceManager manager)
          Setter method for the instantiating manager for that component
 
Methods inherited from interface com.vii.brillien.kernel.axiom.Presence
aspirationTimeIsUp, getAspirationTimeMeasure, getFullName, getMessageProcessorParameterNames, getMessageProcessorParameterTypes, getName, hasMessageProcessorReturnValue, isAspirationPeriodical, reset, setAspirationPeriodical, setAspirationTimeMeasure, setName
 
Methods inherited from interface com.vii.brillien.kernel.axiom.Aspirer
activateCallable, getResult, hasActivity, isWaitingForInputData, isWaitingForResponse, passivateCallable, plan, sendAGet, sendDelegatedSet, sendError, sendError, sendError, sendGet, sendGet, sendResponse, sendSet, sendUnitAGet, sendUnitDelegatedSet, sendUnitGet, sendUnitGet, sendUnitSet
 
Methods inherited from interface java.util.concurrent.Callable
call
 
Methods inherited from interface com.vii.brillien.kernel.axiom.Sensor
activateMessaging, communicationReceived, errorReceived, passivateMessaging, presenseChangedState
 
Methods inherited from interface com.vii.brillien.kernel.axiom.Progressor
addState, changeState, getActualStates, getPotentialStates, getStateDivision, hasStateMachine, initStateMashine, isInExitState, isInState, isInValidStates, panic, registerStateChangeNotification, removeState, setStateDivision, unregisterStateChangeNotification
 

Field Detail

RESIDENT

static final int RESIDENT
Singleton will be made only once.

See Also:
Constant Field Values

CONSONANT

static final int CONSONANT
Consonant will be instanciated in every process meaning different transaction id.

See Also:
Constant Field Values

SPARKLE

static final int SPARKLE
Sparklink will be instantiated in every incoming communication

See Also:
Constant Field Values
Method Detail

getFlow

Flow getFlow()
Gets the flow referece of the Presence. It is an important field during transaction-based business processes.

Returns:
Presence's Flow reference

getFlowID

String getFlowID()
Gets the flow ID of the Presence.


setFlow

void setFlow(Flow flow)
             throws BrillienException
Sets the flow ID of the Presence. This operation is required during every instance creation.

Parameters:
flow - Presence's Flow reference
Throws:
BrillienException

getSuperUnits

Collection<Unit> getSuperUnits()
Gets superunits instances. This includes container units, flow, contexts.

Returns:
superunits

addSuperUnits

void addSuperUnits(Unit... ses)
                   throws BrillienException
Adds new superunits.

Parameters:
ses - array of new superunits
Throws:
BrillienException

removeSuperUnits

void removeSuperUnits(Unit... ses)
                      throws BrillienException
Removes superunits.

Parameters:
ses - array of superunits to remove
Throws:
BrillienException

clearSuperUnits

void clearSuperUnits()
                     throws BrillienException
Clears all subunits

Throws:
BrillienException

getPresenceManager

PresenceManager getPresenceManager()
Getter method for the instantiating manager for that component


setPresenceManager

void setPresenceManager(PresenceManager manager)
Setter method for the instantiating manager for that component

Parameters:
manager - instantiating manager

retrieve

void retrieve()
              throws BrillienException
Makes this presence to be retrieved by the proper Presencemanager

Throws:
BrillienException

activateAll

void activateAll()
                 throws BrillienException
Activates all activity of the Presence (messaging, aspiring).

Throws:
BrillienException

passivateAll

void passivateAll()
                  throws BrillienException
Passivates all activity of the Presence (messaging, aspiring).

Throws:
BrillienException

printErrorStates

String printErrorStates()

getSharing

<S> S getSharing(Object key)
Tries to retrieve a shared Resource.

Type Parameters:
S - Generic type of the resource
Parameters:
key - key of the sharing
Returns:
The shared resource if exists, null otherwise

getSSOPresenceName

String getSSOPresenceName()
Gets the name of the Presence providing SSO functionality

Returns:
name of the SSO Presence if exists, null otherwise

getApiKeyPresenceName

String getApiKeyPresenceName()
Gets the name of the presence providing API_KEY functionality

Returns:
name of the API_KEY Presence if exists, null otherwise


Copyright © 2012. All Rights Reserved.