org.apache.ojb.broker
Class PBStateEvent

java.lang.Object
  extended by java.util.EventObject
      extended by org.apache.ojb.broker.util.event.OjbEvent
          extended by org.apache.ojb.broker.PersistenceBrokerEvent
              extended by org.apache.ojb.broker.PBStateEvent
All Implemented Interfaces:
java.io.Serializable

public final class PBStateEvent
extends PersistenceBrokerEvent

The PBStateEvent encapsulates information about the life-cycle/transaction demarcation of the used PersistenceBroker instance.

Version:
$Id: PBStateEvent.java 365231 2005-12-21 22:22:08Z tomdz $
Author:
Armin Waibel
See Also:
Serialized Form

Nested Class Summary
static class PBStateEvent.Type
          Enum-like class for the event types.
 
Field Summary
static int KEY_AFTER_BEGIN
          Denotes an event that happens after a transaction was started.
static int KEY_AFTER_COMMIT
          Denotes an event that happens after a transaction was comitted.
static int KEY_AFTER_OPEN
          Denotes an event that happens after a broker was opened.
static int KEY_AFTER_ROLLBACK
          Denotes an event that happens after a transaction was rolled back.
static int KEY_BEFORE_BEGIN
          Denotes an event that happens before a transaction will be started.
static int KEY_BEFORE_CLOSE
          Denotes an event that happens before the broker will be closed.
static int KEY_BEFORE_COMMIT
          Denotes an event that happens before a transaction will be comitted.
static int KEY_BEFORE_ROLLBACK
          Denotes an event that happens before a transaction will be rolled back.
 
Constructor Summary
PBStateEvent(PersistenceBroker broker, PBStateEvent.Type eventType)
          Creates a new event instance.
 
Method Summary
 PBStateEvent.Type getEventType()
          Returns the event type.
 java.lang.String toString()
          
 
Methods inherited from class org.apache.ojb.broker.PersistenceBrokerEvent
getTriggeringBroker
 
Methods inherited from class java.util.EventObject
getSource
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

KEY_BEFORE_CLOSE

public static final int KEY_BEFORE_CLOSE
Denotes an event that happens before the broker will be closed.

See Also:
Constant Field Values

KEY_BEFORE_BEGIN

public static final int KEY_BEFORE_BEGIN
Denotes an event that happens before a transaction will be started.

See Also:
Constant Field Values

KEY_BEFORE_COMMIT

public static final int KEY_BEFORE_COMMIT
Denotes an event that happens before a transaction will be comitted.

See Also:
Constant Field Values

KEY_BEFORE_ROLLBACK

public static final int KEY_BEFORE_ROLLBACK
Denotes an event that happens before a transaction will be rolled back.

See Also:
Constant Field Values

KEY_AFTER_BEGIN

public static final int KEY_AFTER_BEGIN
Denotes an event that happens after a transaction was started.

See Also:
Constant Field Values

KEY_AFTER_COMMIT

public static final int KEY_AFTER_COMMIT
Denotes an event that happens after a transaction was comitted.

See Also:
Constant Field Values

KEY_AFTER_OPEN

public static final int KEY_AFTER_OPEN
Denotes an event that happens after a broker was opened.

See Also:
Constant Field Values

KEY_AFTER_ROLLBACK

public static final int KEY_AFTER_ROLLBACK
Denotes an event that happens after a transaction was rolled back.

See Also:
Constant Field Values
Constructor Detail

PBStateEvent

public PBStateEvent(PersistenceBroker broker,
                    PBStateEvent.Type eventType)
Creates a new event instance.

Parameters:
broker - The broker
eventType - The type of the event
Method Detail

toString

public java.lang.String toString()

Overrides:
toString in class java.util.EventObject

getEventType

public PBStateEvent.Type getEventType()
Returns the event type.

Returns:
The event type


(C) 2002 - 2006 Apache Software Foundation
All rights reserved. Published under the Apache License 2.0.
http://db.apache.org/ojb
Version: 1.0.4, 2005-12-30