Handler

public abstract class Handler<E extends KompicsEvent>

The Handler class.

Author:Cosmin Arad <cosmin@sics.se>, Jim Dowling <jdowling@sics.se>, Lars Kroll <lkroll@kth.se>

Fields

eventType

Class<E> eventType

Constructors

Handler

public Handler()

Instantiates a new handler.

Handler

public Handler(Class<E> eventType)

Instantiates a new handler.

Parameters:
  • eventType – the event type

Methods

getEventType

public Class<E> getEventType()

Gets the event type.

Returns:the event type

handle

public abstract void handle(E event)

Handle.

Parameters:
  • event – the event

setEventType

public void setEventType(Class<E> eventType)

Sets the event type.

Parameters:
  • eventType – the new event type