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

All Superinterfaces:
Aspirer<C,R>, Callable<R>, Presence<C,R>, Progressor, Sensor<C>, Unit<P,C,R>
All Known Subinterfaces:
Commander<P,C,R>, Flow<P,C,R>

public interface Context<P extends Presence,C extends Communication,R>
extends Unit<P,C,R>

Context is a special Unit type providing a metalevel collapsing set functionality extended by sharing services.


Field Summary
 
Fields inherited from interface com.vii.brillien.kernel.axiom.atomic.Presence
CONSONANT, RESIDENT, SPARKLE
 
Method Summary
 void addExceptionLeveling(Filter f, Shifter s)
          Adds a Filter-Shifter mapping to the given context
 void clearExceptionLeveling()
          Clears all Filter-Shifter mappings from the given context
<S> S
getSharing(Presence p, Object key)
          Getter method to access a sharing by a given name
 Shifter getShifter(BrillienException be)
          Gets the proper Shifter to the given BrillienException instance if exists
 boolean hasSharing(Presence p, Object key)
          Decides whether a sharing is available in this flow.
 BrillienException levelException(BrillienException be)
          Transforms the given exception according to the filter-shifter mappings available in this context
<T> void
registerSharing(Presence p, Object key, T object)
          Shares an object with the given key
 void removeExceptionLeveling(Filter f)
          Removes a Filter-Shifter mapping by the given filter
 void removeSharing(Presence p, Object key)
          Removes a shared content
 
Methods inherited from interface com.vii.brillien.kernel.axiom.atomic.Unit
activateUnitAll, activateUnitCallable, activateUnitMessaging, addPresence, addPresences, addSubUnit, addSubUnits, classify, clearPresences, clearSubUnits, communicationUnitReceived, complement, getCharacteristicFunction, getPresences, getSubUnits, hasUnitActivity, intersect, isSubSet, isUnitInExitState, isUnitInValidStates, isUnitWaitingForResponse, order, passivateUnitAll, passivateUnitCallable, passivateUnitMessaging, printUnitErrorStates, removePresence, removePresences, removeSubUnit, removeSubUnits, retrieveUnit, scrutinise, setCharacteristicFunction, subset, symmetricDifference, union
 
Methods inherited from interface com.vii.brillien.kernel.axiom.atomic.Presence
activateAll, addSuperUnits, clearSuperUnits, getApiKeyPresenceName, getApiVersion, getFlow, getFlowID, getLoggedUser, getLoggedUser, getPresence, getPresenceManager, getSharing, getSSOPresenceName, getSuperUnits, loginUser, passivateAll, printErrorStates, removeSuperUnits, retrieve, setApiVersion, setFlow, setPresenceManager
 
Methods inherited from interface com.vii.brillien.kernel.axiom.Presence
aspirationTimeIsUp, getAspirationPattern, getAspirationTimeMeasure, getFullName, getInterface, getMessageProcessorParameterNames, getMessageProcessorParameterTypes, getName, hasMessageProcessorReturnValue, isAspirationPeriodical, reset, setAspirationPattern, 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
 

Method Detail

registerSharing

<T> void registerSharing(Presence p,
                         Object key,
                         T object)
Shares an object with the given key

Type Parameters:
T - shared content's type
Parameters:
p - component reference who want to share
key - unique key for the sharing
object - shared object

removeSharing

void removeSharing(Presence p,
                   Object key)
Removes a shared content

Parameters:
p - component reference who want to share
key - unique key for the sharing

hasSharing

boolean hasSharing(Presence p,
                   Object key)
Decides whether a sharing is available in this flow. This may induce a searching in the parent flows too.

Parameters:
p - searcher component reference
key - key of the sharing that should be retrieved
Returns:
availability of a sharing by a given name

getSharing

<S> S getSharing(Presence p,
                 Object key)
Getter method to access a sharing by a given name

Type Parameters:
S - shared content
Parameters:
p - accessor Presence reference
key - key of the shared content
Returns:
shared content's type

levelException

BrillienException levelException(BrillienException be)
Transforms the given exception according to the filter-shifter mappings available in this context


getShifter

Shifter getShifter(BrillienException be)
Gets the proper Shifter to the given BrillienException instance if exists


addExceptionLeveling

void addExceptionLeveling(Filter f,
                          Shifter s)
Adds a Filter-Shifter mapping to the given context


removeExceptionLeveling

void removeExceptionLeveling(Filter f)
Removes a Filter-Shifter mapping by the given filter


clearExceptionLeveling

void clearExceptionLeveling()
Clears all Filter-Shifter mappings from the given context



Copyright © 2012. All Rights Reserved.