com.vii.brillien.kernel.axiom
Interface Sensor<C extends Communication>

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>, Presence<C,R>, PresenceManager<P,C>, Unit<P,C,R>

public interface Sensor<C extends Communication>

Brillien represents the probelms of real world as a free communications' flow. Components have 3 roles basically: start, receive communication and alter during communications This interface define all receptive behaviors which belongs to receiving part of its roles. A component should define and provide information about accepted message names, parameteres, types, synchronous or asynchronous call possibilities. This interface define the message-receiver functionality of a component. A Sensor object could contain an InputDivision object to validate the incoming messages. This is a decision point before procesing any incomping messages. Invalid input message are not delegeted to the component.


Method Summary
 void activateMessaging()
          Makes the object active
 Object communicationReceived(C message)
          Notification method about an incoming text-based message addressed to this Sensor.
 Object errorReceived(C message)
          Special method invoked by Brillien if an error message has been received.
 void passivateMessaging()
          Makes the object passive.
 void presenseChangedState(String entityName, State oldState, State newState)
          Invoked when this entity has been registered as a listener to other entity's state change events
 

Method Detail

errorReceived

Object errorReceived(C message)
                     throws BrillienException
Special method invoked by Brillien if an error message has been received.

Parameters:
message - error message received
Throws:
BrillienException - in case of unhandled error

communicationReceived

Object communicationReceived(C message)
                             throws BrillienException
Notification method about an incoming text-based message addressed to this Sensor.

Parameters:
message - message object received
Throws:
BrillienException - Exception thrown in a problematic situation

activateMessaging

void activateMessaging()
                       throws BrillienException
Makes the object active

Throws:
BrillienException

passivateMessaging

void passivateMessaging()
                        throws BrillienException
Makes the object passive. Every unanswered message should be thrown away.

Throws:
BrillienException

presenseChangedState

void presenseChangedState(String entityName,
                          State oldState,
                          State newState)
                          throws BrillienException
Invoked when this entity has been registered as a listener to other entity's state change events

Throws:
BrillienException


Copyright © 2012. All Rights Reserved.