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

All Superinterfaces:
Aspirer<C,Object>, Callable<Object>, Presence<C,Object>, Progressor, Sensor<C>, Unit<P,C,Object>

public interface PresenceManager<P extends Presence,C extends Communication>
extends Unit<P,C,Object>

Instantiation manager interface, factory-like interface according the environment of the component like: used libraries, component version, transaction management, instance management type, etc. A Presence type (class) is managed by this object to create/build/stop/destruct instances.


Field Summary
 
Fields inherited from interface com.vii.brillien.kernel.axiom.atomic.Presence
CONSONANT, RESIDENT, SPARKLE
 
Method Summary
 void activatePresenceManager()
          Activates the PresenceManager according to the initialized configuration.
 ClassLoader getClassLoader()
          Getter method for the classloader assigned to this PresenceManager
 String getFlowIDPrefix()
          Getter method to request the prefix for generating FlowIDs
 P getInstance(Presence caller)
          Getter method for a new instance of the Presence type specifying the caller
 P getInstance(Presence caller, String name)
          Getter method for a new instance of the Presence type specifying the caller
 P getInstance(String flowID)
          Getter method for a new instance of the Presence type specifying the ID of the flow
 P getInstance(String flowID, String name)
          Getter method for a new instance of the Presence type specifying the ID of the flow
 Level getLogLevel()
          Getter method for log level of the specific Presence type
 int getLogType()
          Getter method for log type of the specific Presence type
 int getManagementType()
          Getter method to get the instance creation method to follow regarding this Presence type.
<T> Mediator<C,T>
getMediator()
          Retrieves a mediator representing the transport layer
 long getMessageExpiration()
          Gets the timout for message processing.
 Map<String,Object> getParameters()
          Getter method for getting input parameters
 Class<P> getPresenceClass()
          Getter method to request the Class definition of a specific Presence type
 long getPresenceTimeMeasure()
          Retrieves the timeUnit value of the given Presence type.
 void initPresenceManager(String presenceName, Class<P> PresenceClass)
          Initializes the PresenceManager with the given class instance, reads the annotations of the presence type
 boolean isPresencePeriodical()
          Gets the periodicity flag of the given Presence type
 void markMessageToSend(C shared, C message)
          Presences let the PresenceManager to know about the messages sent through this method
 void retrieveReferences(P... presences)
          All Presence instances managed by this PresenceManager will be retrieved
 void setClassLoader(ClassLoader classLoader)
          Sets classloader to be assigned to this PresenceManager
 void setLogLevel(String logLevel)
          Setter method for log level of the specific Presence type
 void setLogType(int logType)
          Setter method for log type of the specific Presence type
 void setMessageExpiration(long messageExpiration)
          Sets the timout for message processing.
 void setParameters(Map<String,Object> parameters)
          Setter method for adding input Parameters for every given Presence creation
 void setPresencePeriodical(boolean presencePeriodical)
          Sets the periodicity flag of the given Presence type
 void setPresenceTimeMeasure(long timeMeasure)
          Sets the timeUnit value of the the given Presence type, read from the nnnotation of the type.
 void setSSOPresenceName(String ssoPresenceName)
          Sets custom SSO presence
 
Methods inherited from interface com.vii.brillien.kernel.axiom.atomic.Unit
activateUnitAll, activateUnitCallable, activateUnitMessaging, addPresences, addSubUnits, classify, clearPresences, clearSubUnits, communicationUnitReceived, complement, getCharacteristicFunction, getPresences, getSubUnits, hasUnitActivity, intersect, isSubSet, isUnitInExitState, isUnitInValidStates, isUnitWaitingForResponse, order, passivateUnitAll, passivateUnitCallable, passivateUnitMessaging, printUnitErrorStates, removePresences, removeSubUnits, retrieveUnit, scrutinise, setCharacteristicFunction, subset, symmetricDifference, union
 
Methods inherited from interface com.vii.brillien.kernel.axiom.atomic.Presence
activateAll, addSuperUnits, clearSuperUnits, getApiKeyPresenceName, getFlow, getFlowID, getPresenceManager, getSharing, getSSOPresenceName, getSuperUnits, passivateAll, printErrorStates, removeSuperUnits, retrieve, setFlow, setPresenceManager
 
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
 

Method Detail

initPresenceManager

void initPresenceManager(String presenceName,
                         Class<P> PresenceClass)
                         throws BrillienException
Initializes the PresenceManager with the given class instance, reads the annotations of the presence type

Parameters:
PresenceClass - presence class instance
Throws:
BrillienException

activatePresenceManager

void activatePresenceManager()
                             throws BrillienException
Activates the PresenceManager according to the initialized configuration.

Throws:
BrillienException

getPresenceClass

Class<P> getPresenceClass()
Getter method to request the Class definition of a specific Presence type


getFlowIDPrefix

String getFlowIDPrefix()
Getter method to request the prefix for generating FlowIDs


getInstance

P getInstance(Presence caller)
                               throws BrillienException
Getter method for a new instance of the Presence type specifying the caller

Throws:
BrillienException

getInstance

P getInstance(String flowID)
                               throws BrillienException
Getter method for a new instance of the Presence type specifying the ID of the flow

Throws:
BrillienException

getInstance

P getInstance(Presence caller,
              String name)
                               throws BrillienException
Getter method for a new instance of the Presence type specifying the caller

Throws:
BrillienException

getInstance

P getInstance(String flowID,
              String name)
                               throws BrillienException
Getter method for a new instance of the Presence type specifying the ID of the flow

Throws:
BrillienException

retrieveReferences

void retrieveReferences(P... presences)
                        throws BrillienException
All Presence instances managed by this PresenceManager will be retrieved

Parameters:
presences - presences to be retrieved
Throws:
BrillienException

getClassLoader

ClassLoader getClassLoader()
Getter method for the classloader assigned to this PresenceManager


setClassLoader

void setClassLoader(ClassLoader classLoader)
Sets classloader to be assigned to this PresenceManager


getManagementType

int getManagementType()
Getter method to get the instance creation method to follow regarding this Presence type. One of the following will be returned: RESIDENT, Sparkle, CONSONANT

Returns:
instance creation type ID

getPresenceTimeMeasure

long getPresenceTimeMeasure()
Retrieves the timeUnit value of the given Presence type. Measured in milliseconds.


setPresenceTimeMeasure

void setPresenceTimeMeasure(long timeMeasure)
Sets the timeUnit value of the the given Presence type, read from the nnnotation of the type. Measured in milliseconds.


isPresencePeriodical

boolean isPresencePeriodical()
Gets the periodicity flag of the given Presence type


setPresencePeriodical

void setPresencePeriodical(boolean presencePeriodical)
Sets the periodicity flag of the given Presence type


getMessageExpiration

long getMessageExpiration()
Gets the timout for message processing. Every incoming message which has been sent before (currentTimeMillis-expiration) is considered as expired amd will be ignored.


setMessageExpiration

void setMessageExpiration(long messageExpiration)
Sets the timout for message processing. Every incoming message which has been sent before (currentTimeMillis-expiration) is considered as expired amd will be ignored.


getLogType

int getLogType()
Getter method for log type of the specific Presence type


setLogType

void setLogType(int logType)
Setter method for log type of the specific Presence type

Parameters:
logType - log type

getLogLevel

Level getLogLevel()
Getter method for log level of the specific Presence type


setLogLevel

void setLogLevel(String logLevel)
Setter method for log level of the specific Presence type

Parameters:
logLevel - log level

getParameters

Map<String,Object> getParameters()
Getter method for getting input parameters

Returns:
parametersMap parameters' hashmap read from the presence config file

setParameters

void setParameters(Map<String,Object> parameters)
Setter method for adding input Parameters for every given Presence creation

Parameters:
parameters - parameters' hashmap read from the presence config file

getMediator

<T> Mediator<C,T> getMediator()
Retrieves a mediator representing the transport layer


setSSOPresenceName

void setSSOPresenceName(String ssoPresenceName)
Sets custom SSO presence


markMessageToSend

void markMessageToSend(C shared,
                       C message)
Presences let the PresenceManager to know about the messages sent through this method



Copyright © 2012. All Rights Reserved.