org.mmbase.core.event
Class Event

java.lang.Object
  extended by org.mmbase.core.event.Event
All Implemented Interfaces:
Serializable, Cloneable, PublicCloneable<Event>
Direct Known Subclasses:
AssignmentEvents.Event, EmailEvent, Events.Event, FullIndexEvents.Event, IdEvent, LocalEvent, NewSearcher.Event, NodeEvent, ProposedJobs.Event, RelationEvent, SMSEvent, SystemEvent

public abstract class Event
extends Object
implements Serializable, PublicCloneable<Event>

This class is the base class for all mmbase events

Since:
MMBase-1.8
Version:
$Id: Event.java 41174 2010-02-25 22:14:09Z michiel $
Author:
Ernst Bunders
See Also:
Serialized Form

Field Summary
protected  int eventType
           
protected  String machine
           
static int TYPE_CHANGE
           
static int TYPE_DELETE
           
static int TYPE_NEW
           
static int TYPE_UNSPECIFIED
           
 
Constructor Summary
Event()
           
Event(String machine)
           
Event(String machine, int type)
           
 
Method Summary
 Event clone()
           
 String getMachine()
          Every event originates from a certain machine, which is identified by a String.
 int getType()
          Most events will come in certain 'types', default contants which are provided are TYPE_NEW, TYPE_CHANGE and TYPE_DELETE.
 boolean isLocal()
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TYPE_UNSPECIFIED

public static final int TYPE_UNSPECIFIED
See Also:
Constant Field Values

TYPE_NEW

public static final int TYPE_NEW
See Also:
Constant Field Values

TYPE_CHANGE

public static final int TYPE_CHANGE
See Also:
Constant Field Values

TYPE_DELETE

public static final int TYPE_DELETE
See Also:
Constant Field Values

eventType

protected int eventType

machine

protected String machine
Constructor Detail

Event

public Event(String machine,
             int type)
Parameters:
machine - The machine name. If null the local machine name is extracted from MMBase, using MMBaseContext.getMachineName()

Event

public Event(String machine)

Event

public Event()
Since:
MMBase-1.8.4
Method Detail

getMachine

public String getMachine()
Every event originates from a certain machine, which is identified by a String. If this equals MMBaseContext.getMachineName() then this is a local event.


isLocal

public boolean isLocal()

getType

public int getType()
Most events will come in certain 'types', default contants which are provided are TYPE_NEW, TYPE_CHANGE and TYPE_DELETE.


clone

public Event clone()
Specified by:
clone in interface PublicCloneable<Event>
Overrides:
clone in class Object


MMBase 2.0-SNAPSHOT - null