public abstract class EventHandler extends MusicalAgentComponent
| Modifier and Type | Field and Description |
|---|---|
protected java.lang.String |
commType
The comm type.
|
protected java.lang.String |
eventExchange
The event exchange.
|
protected java.lang.String |
eventType
Event Handler's parameters.
|
protected long |
frameTime
The frame time.
|
protected long |
happeningFrame
The happening frame.
|
(package private) java.util.ArrayList<Reasoning> |
listeners
The listeners.
|
protected Comm |
myComm
The my comm.
|
protected Memory |
myMemory
The my memory.
|
protected long |
period
The period.
|
protected Vector |
relative_position
The relative_position.
|
protected long |
sendDeadline
The send deadline.
|
protected long |
startTime
The start time.
|
protected Constants.EH_STATUS |
status
Event Handler's state 0: not registered, 1: registered.
|
protected long |
workingFrame
The working frame.
|
parameters| Constructor and Description |
|---|
EventHandler() |
| Modifier and Type | Method and Description |
|---|---|
void |
confirmDeregistration()
Confirm deregistration.
|
void |
confirmRegistration(java.lang.String eventExecution,
Parameters serverParameters,
Parameters extraParameters)
Confirm registration.
|
void |
deregister()
Remove o registro do EventHandler do EventServer correspondente.
|
protected void |
eventHandlerDeregistered()
Called after the Event Handler has been deregistered within the Event Server.
|
protected void |
eventHandlerRegistered()
Called after the Event Handler has been registered within the Event Server.
|
java.lang.String |
getEventType()
Gets the event type.
|
Vector |
getRelativePosition()
Gets the relative position.
|
Constants.EH_STATUS |
getStatus()
Gets the status.
|
protected void |
process(Event evt)
Process an event before acting or after sensing.
|
void |
register()
Registra o EventHandler no EventServer correspondente.
|
void |
registerListener(Reasoning reasoning)
Register listener.
|
void |
setEventType(java.lang.String eventType)
Sets the event type.
|
void |
setRelativePosition(Vector relative_position)
Sets the relative position.
|
boolean |
start()
Framework-implemented initialization method.
|
boolean |
stop()
Framework-implemented finalization method.
|
addParameter, addParameters, configure, finit, getAddress, getAgent, getComponentName, getComponentType, getParameter, getParameter, getParameters, getState, getType, init, parameterUpdate, processCommand, receiveCommand, sendCommand, setAgent, setComponentName, setParameters, setState, setTypeprotected Constants.EH_STATUS status
protected java.lang.String eventType
protected java.lang.String eventExchange
protected java.lang.String commType
protected Vector relative_position
protected Comm myComm
protected Memory myMemory
protected long startTime
protected long frameTime
protected long period
protected long sendDeadline
protected long workingFrame
protected long happeningFrame
java.util.ArrayList<Reasoning> listeners
public boolean start()
LifeCyclepublic boolean stop()
LifeCyclepublic void setEventType(java.lang.String eventType)
eventType - the new event typepublic java.lang.String getEventType()
public Constants.EH_STATUS getStatus()
public void setRelativePosition(Vector relative_position)
relative_position - the new relative positionpublic Vector getRelativePosition()
public void register()
public void confirmRegistration(java.lang.String eventExecution,
Parameters serverParameters,
Parameters extraParameters)
eventExecution - the event executionserverParameters - the server parametersextraParameters - the extra parameterspublic void registerListener(Reasoning reasoning)
reasoning - the reasoningpublic void deregister()
public void confirmDeregistration()
protected void process(Event evt) throws java.lang.Exception
evt - the evtjava.lang.Exception - the exceptionprotected void eventHandlerRegistered()
protected void eventHandlerDeregistered()