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

All Superinterfaces:
Aspirer<C,R>, Callable<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>, Presence<C,R>, PresenceBoard<P,C>, PresenceManager<P,C>, Unit<P,C,R>

public interface Presence<C extends Communication,R>
extends Aspirer<C,R>, Sensor<C>, Progressor

Brillien represents the probelms of real world as a free communications' flow. Components have 3 roles basically: start, receive communication and alter during communications decribed by interfaces Aspirer, Sensor and Progressor. The Presence interface is the subinterface of the previous 3. All Brillien object must implement this interface, or in other words, every components in Brillien is a Presence instance. So presence and component are synonyms. Every component has a unique name a flow and a presenceManager.


Method Summary
 void aspirationTimeIsUp()
          Invoked when a timeout service was started and timeout has been reached
 CronPattern getAspirationPattern()
          Retrieces the date pattern for callable activity scheduling
 long getAspirationTimeMeasure()
          Retrieves the timeUnit value of the current callable activity
 String getFullName()
          Gets the full name of the Presence instance
 Map<String,Map<String,String>> getInterface()
          Retrieves the complete interface composed by the services methods and its parameters defined i nthis messageprocessor
 List<String> getMessageProcessorParameterNames(String messageProcessorName)
          Retrieves the name of the given messageprocessor if the parameters are annotated with @P
 List<String> getMessageProcessorParameterTypes(String messageProcessorName)
          Retrieves the formal parameter list's types of the given messageprocessor
 String getName()
          Gets the name of the Presence instance
 boolean hasMessageProcessorReturnValue(String messageProcessorName)
          Retrieves whether the messageprocessor with the given name has a return value
 boolean isAspirationPeriodical()
          Tells whether the Aspirer is executed periodically or not.
 void reset()
          Resets the presence to an initial state
 void setAspirationPattern(CronPattern datePattern)
          Sets the date pattern for callable activity scheduling
 void setAspirationPeriodical(boolean periodical)
          Sets the periodical execution of the Presence.
 void setAspirationTimeMeasure(long timeout)
          Sets the timeUnit value of the current callable activity.
 void setName(String name)
          Sets the name of the Presence instance
 
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

getName

String getName()
Gets the name of the Presence instance


getFullName

String getFullName()
Gets the full name of the Presence instance


setName

void setName(String name)
Sets the name of the Presence instance


getAspirationTimeMeasure

long getAspirationTimeMeasure()
Retrieves the timeUnit value of the current callable activity


setAspirationTimeMeasure

void setAspirationTimeMeasure(long timeout)
Sets the timeUnit value of the current callable activity. Must be set right after instantiation


getAspirationPattern

CronPattern getAspirationPattern()
Retrieces the date pattern for callable activity scheduling

See Also:
CronPattern

setAspirationPattern

void setAspirationPattern(CronPattern datePattern)
Sets the date pattern for callable activity scheduling


isAspirationPeriodical

boolean isAspirationPeriodical()
Tells whether the Aspirer is executed periodically or not.


setAspirationPeriodical

void setAspirationPeriodical(boolean periodical)
Sets the periodical execution of the Presence. Must be called before the activation process.


aspirationTimeIsUp

void aspirationTimeIsUp()
Invoked when a timeout service was started and timeout has been reached


reset

void reset()
Resets the presence to an initial state


hasMessageProcessorReturnValue

boolean hasMessageProcessorReturnValue(String messageProcessorName)
                                       throws BrillienException
Retrieves whether the messageprocessor with the given name has a return value

Parameters:
messageProcessorName -
Throws:
BrillienException - if no annotation is present in the parameter list or messageProcessor doesn't exists)

getMessageProcessorParameterNames

List<String> getMessageProcessorParameterNames(String messageProcessorName)
                                               throws BrillienException
Retrieves the name of the given messageprocessor if the parameters are annotated with @P

Parameters:
messageProcessorName - name of the messageProcessor
Returns:
parameters' names
Throws:
BrillienException - if no annotation is present in the parameter list or messageProcessor doesn't exists)

getMessageProcessorParameterTypes

List<String> getMessageProcessorParameterTypes(String messageProcessorName)
                                               throws BrillienException
Retrieves the formal parameter list's types of the given messageprocessor

Parameters:
messageProcessorName - name of the messageProcessor
Returns:
parameters' types
Throws:
BrillienException - if any error occurs

getInterface

Map<String,Map<String,String>> getInterface()
                                            throws BrillienException
Retrieves the complete interface composed by the services methods and its parameters defined i nthis messageprocessor

Returns:
complete interface
Throws:
BrillienException - if any error occurs


Copyright © 2012. All Rights Reserved.