asgaard.skid
Class SkidEvent

java.lang.Object
  |
  +--asgaard.skid.SkidEvent

public class SkidEvent
extends java.lang.Object

An event can be produced to indicate an major modification and may be suscribed by any object to recognize this modification. It has to be explicitely set by an object and is also consumed explicitely by consumed by an object. The aim is to avoid event-avalanches by automated event- mechanism and adding explicite push-capabilities to the framework.


Field Summary
static byte EVENT_CHECKED
          The state of this event is CHECKED from the consumer
static byte EVENT_DELETED
          The state of this event is DELETED
static byte EVENT_PATTERN
          The type/state of this event is an pattern for generating Events
static byte EVENT_READ
          The state of this event is processed from the consumer
static byte EVENT_UNREAD
          The state of this event is UNREAD
 
Constructor Summary
SkidEvent(int consumer, int producer, int event, byte state, long created)
          Creates a new Event
 
Method Summary
 RemoteBean getConsumer()
          Returns the the Consumer
 RemoteBean getEvent()
          Returns the the Event
 java.lang.String getName()
          Returns the Name of the Event was created
 RemoteBean getProducer()
          Returns the the Producer
 byte getState()
          Returns the state of the Event
 java.util.Date getTime()
          Returns the Time the Event was created
 void setState(byte newState)
          Chages the State of the event
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EVENT_PATTERN

public static final byte EVENT_PATTERN
The type/state of this event is an pattern for generating Events

EVENT_UNREAD

public static final byte EVENT_UNREAD
The state of this event is UNREAD

EVENT_READ

public static final byte EVENT_READ
The state of this event is processed from the consumer

EVENT_CHECKED

public static final byte EVENT_CHECKED
The state of this event is CHECKED from the consumer

EVENT_DELETED

public static final byte EVENT_DELETED
The state of this event is DELETED
Constructor Detail

SkidEvent

public SkidEvent(int consumer,
                 int producer,
                 int event,
                 byte state,
                 long created)
Creates a new Event
Parameters:
consumer - key of the consumer
producer - key of the producer
evnet - key of the producer
state - of the event
created - timestamp
Method Detail

setState

public void setState(byte newState)
              throws java.lang.Exception
Chages the State of the event
Parameters:
newState - the new state
Throws:
java.lang.Exception -  

getTime

public java.util.Date getTime()
Returns the Time the Event was created

getName

public java.lang.String getName()
                         throws java.lang.Exception
Returns the Name of the Event was created
Throws:
java.lang.Exception -  

getState

public byte getState()
Returns the state of the Event

getEvent

public RemoteBean getEvent()
                    throws java.lang.Exception
Returns the the Event
Throws:
java.lang.Exception -  

getProducer

public RemoteBean getProducer()
                       throws java.lang.Exception
Returns the the Producer
Throws:
java.lang.Exception -  

getConsumer

public RemoteBean getConsumer()
                       throws java.lang.Exception
Returns the the Consumer
Throws:
java.lang.Exception -