Package org.eclipse.persistence.sessions
Class SessionEventManager
- java.lang.Object
-
- org.eclipse.persistence.core.sessions.CoreSessionEventManager<SessionEventListener>
-
- org.eclipse.persistence.sessions.SessionEventManager
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Cloneable
public class SessionEventManager extends CoreSessionEventManager<SessionEventListener> implements java.lang.Cloneable, java.io.Serializable
Purpose: Used to support session events. To register for events notification an event listener must be registered with the session.
- See Also:
Session.getEventManager()
,SessionEvent
, Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.List<SessionEventListener>
listeners
protected Session
session
-
Constructor Summary
Constructors Constructor Description SessionEventManager()
INTERNAL: Default constructor.SessionEventManager(Session session)
PUBLIC: Create a new session event manager for a session
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addListener(SessionEventListener listener)
PUBLIC: Add the event listener to the session.java.lang.Object
clone()
INTERNAL: Shallow clone the event manager.SessionEventManager
clone(Session newSession)
INTERNAL: Clone the event manager for the new session.protected void
endOperationProfile()
INTERNAL: End calljava.util.List<SessionEventListener>
getListeners()
PUBLIC: The event listeners will receive all events raised by this session.Session
getSession()
INTERNAL: Get the session for this session event managerboolean
hasListeners()
PUBLIC: Check if there are any event listeners.void
missingDescriptor(java.lang.Class missingClass)
INTERNAL: Raised for missing descriptors for lazy registration.void
moreRowsDetected(org.eclipse.persistence.internal.databaseaccess.DatabaseCall call)
INTERNAL: Raised for stored proc output parameters.void
noRowsModified(ModifyQuery query, java.lang.Object object)
INTERNAL: Raised for stored proc output parameters.void
outputParametersDetected(Record outputRow, org.eclipse.persistence.internal.databaseaccess.DatasourceCall call)
INTERNAL: Raised for stored proc output parameters.void
postAcquireClientSession()
INTERNAL: Post acquire client session.void
postAcquireConnection(org.eclipse.persistence.internal.databaseaccess.Accessor accessor)
INTERNAL: Raised after acquire a connection from a connection pool.void
postAcquireExclusiveConnection(ClientSession clientSession, org.eclipse.persistence.internal.databaseaccess.Accessor accessor)
INTERNAL: Raised after acquire a connection from a connection pool.void
postAcquireUnitOfWork()
INTERNAL: Post acquire unit of work.void
postBeginTransaction()
INTERNAL: Post begin transaction.void
postCalculateUnitOfWorkChangeSet(org.eclipse.persistence.internal.sessions.UnitOfWorkChangeSet changeSet)
INTERNAL: Post calculate UnitOfWork Change Set.void
postCommitTransaction()
INTERNAL: Post commit transaction.void
postCommitUnitOfWork()
INTERNAL: Post commit unit of work.void
postConnect(org.eclipse.persistence.internal.databaseaccess.Accessor accessor)
INTERNAL: Raised after connecting.void
postDistributedMergeUnitOfWorkChangeSet(org.eclipse.persistence.internal.sessions.UnitOfWorkChangeSet changeSet)
INTERNAL: Pre execute query.void
postExecuteCall(Call call, java.lang.Object result)
INTERNAL: Post execute call.void
postExecuteQuery(DatabaseQuery query, java.lang.Object result)
INTERNAL: Post execute query.void
postFlushUnitOfWork()
INTERNAL: Post flush unit of work.void
postLogin(Session session)
INTERNAL: post login to the session.void
postLogout(Session session)
INTERNAL: post logout to the session.void
postMergeUnitOfWorkChangeSet(org.eclipse.persistence.internal.sessions.UnitOfWorkChangeSet changeSet)
INTERNAL: Pre execute query.void
postReleaseClientSession()
INTERNAL: Post release client session.void
postReleaseUnitOfWork()
INTERNAL: Post release unit of work.void
postResumeUnitOfWork()
INTERNAL: Post resume unit of work.void
postRollbackTransaction()
INTERNAL: Post rollback transaction.void
preBeginTransaction()
INTERNAL: Pre begin transaction.void
preCalculateUnitOfWorkChangeSet()
INTERNAL: Pre calculate UnitOfWork Change Set.void
preCommitTransaction()
INTERNAL: Pre commit transaction.void
preCommitUnitOfWork()
INTERNAL: Pre commit unit of work.void
preDistributedMergeUnitOfWorkChangeSet(org.eclipse.persistence.internal.sessions.UnitOfWorkChangeSet changeSet)
INTERNAL: Pre merge Distributed UnitOfWorkChangeSetvoid
preExecuteCall(Call call)
INTERNAL: Pre execute call.void
preExecuteQuery(DatabaseQuery query)
INTERNAL: Pre execute query.void
preFlushUnitOfWork()
INTERNAL: Pre flush unit of work.void
preLogin(Session session)
INTERNAL: Pre login to the session.void
preLogout(Session session)
INTERNAL: Pre logout to the session.void
preMergeUnitOfWorkChangeSet(org.eclipse.persistence.internal.sessions.UnitOfWorkChangeSet changeSet)
INTERNAL: Pre merge UnitOfWorkChangeSetvoid
prepareUnitOfWork()
INTERNAL: Prepare unit of work.void
preReleaseClientSession()
INTERNAL: Pre release client session.void
preReleaseConnection(org.eclipse.persistence.internal.databaseaccess.Accessor accessor)
INTERNAL: Raised before release a connection to a connection pool.void
preReleaseExclusiveConnection(ClientSession clientSession, org.eclipse.persistence.internal.databaseaccess.Accessor accessor)
INTERNAL: This event is fired just before a Client Session, with isolated data, releases its Exclusive Connectionvoid
preReleaseUnitOfWork()
INTERNAL: Pre release unit of work.void
preRollbackTransaction()
INTERNAL: Pre rollback transaction.void
removeListener(SessionEventListener listener)
PUBLIC: Remove the event listener from the session.protected void
setListeners(java.util.List<SessionEventListener> listeners)
The event listeners will receive all events raised by this session.void
setSession(Session session)
INTERNAL: Set the session for this session event managerprotected void
startOperationProfile()
INTERNAL: Start call
-
-
-
Field Detail
-
listeners
protected java.util.List<SessionEventListener> listeners
-
session
protected Session session
-
-
Constructor Detail
-
SessionEventManager
public SessionEventManager()
INTERNAL: Default constructor.
-
SessionEventManager
public SessionEventManager(Session session)
PUBLIC: Create a new session event manager for a session
-
-
Method Detail
-
addListener
public void addListener(SessionEventListener listener)
PUBLIC: Add the event listener to the session. The listener will receive all events raised by this session. Also unit of works acquire from this session will inherit the listeners. If session is a broker then its members add the listener, too.- Specified by:
addListener
in classCoreSessionEventManager<SessionEventListener>
-
clone
public java.lang.Object clone()
INTERNAL: Shallow clone the event manager.- Overrides:
clone
in classjava.lang.Object
-
clone
public SessionEventManager clone(Session newSession)
INTERNAL: Clone the event manager for the new session.
-
getListeners
public java.util.List<SessionEventListener> getListeners()
PUBLIC: The event listeners will receive all events raised by this session. Also unit of works acquire from this session will inherit the listeners.
-
getSession
public Session getSession()
INTERNAL: Get the session for this session event manager
-
hasListeners
public boolean hasListeners()
PUBLIC: Check if there are any event listeners.
-
missingDescriptor
public void missingDescriptor(java.lang.Class missingClass)
INTERNAL: Raised for missing descriptors for lazy registration.
-
moreRowsDetected
public void moreRowsDetected(org.eclipse.persistence.internal.databaseaccess.DatabaseCall call)
INTERNAL: Raised for stored proc output parameters.
-
noRowsModified
public void noRowsModified(ModifyQuery query, java.lang.Object object)
INTERNAL: Raised for stored proc output parameters.
-
outputParametersDetected
public void outputParametersDetected(Record outputRow, org.eclipse.persistence.internal.databaseaccess.DatasourceCall call)
INTERNAL: Raised for stored proc output parameters.
-
postAcquireClientSession
public void postAcquireClientSession()
INTERNAL: Post acquire client session.
-
postAcquireConnection
public void postAcquireConnection(org.eclipse.persistence.internal.databaseaccess.Accessor accessor)
INTERNAL: Raised after acquire a connection from a connection pool.
-
postAcquireExclusiveConnection
public void postAcquireExclusiveConnection(ClientSession clientSession, org.eclipse.persistence.internal.databaseaccess.Accessor accessor)
INTERNAL: Raised after acquire a connection from a connection pool.
-
postAcquireUnitOfWork
public void postAcquireUnitOfWork()
INTERNAL: Post acquire unit of work.
-
postBeginTransaction
public void postBeginTransaction()
INTERNAL: Post begin transaction.
-
postCommitTransaction
public void postCommitTransaction()
INTERNAL: Post commit transaction.
-
postCommitUnitOfWork
public void postCommitUnitOfWork()
INTERNAL: Post commit unit of work.
-
postFlushUnitOfWork
public void postFlushUnitOfWork()
INTERNAL: Post flush unit of work.
-
postConnect
public void postConnect(org.eclipse.persistence.internal.databaseaccess.Accessor accessor)
INTERNAL: Raised after connecting.
-
postExecuteCall
public void postExecuteCall(Call call, java.lang.Object result)
INTERNAL: Post execute call.
-
postExecuteQuery
public void postExecuteQuery(DatabaseQuery query, java.lang.Object result)
INTERNAL: Post execute query.
-
postReleaseClientSession
public void postReleaseClientSession()
INTERNAL: Post release client session.
-
postReleaseUnitOfWork
public void postReleaseUnitOfWork()
INTERNAL: Post release unit of work.
-
postResumeUnitOfWork
public void postResumeUnitOfWork()
INTERNAL: Post resume unit of work.
-
postRollbackTransaction
public void postRollbackTransaction()
INTERNAL: Post rollback transaction.
-
postDistributedMergeUnitOfWorkChangeSet
public void postDistributedMergeUnitOfWorkChangeSet(org.eclipse.persistence.internal.sessions.UnitOfWorkChangeSet changeSet)
INTERNAL: Pre execute query.
-
postMergeUnitOfWorkChangeSet
public void postMergeUnitOfWorkChangeSet(org.eclipse.persistence.internal.sessions.UnitOfWorkChangeSet changeSet)
INTERNAL: Pre execute query.
-
preBeginTransaction
public void preBeginTransaction()
INTERNAL: Pre begin transaction.
-
preCalculateUnitOfWorkChangeSet
public void preCalculateUnitOfWorkChangeSet()
INTERNAL: Pre calculate UnitOfWork Change Set.
-
postCalculateUnitOfWorkChangeSet
public void postCalculateUnitOfWorkChangeSet(org.eclipse.persistence.internal.sessions.UnitOfWorkChangeSet changeSet)
INTERNAL: Post calculate UnitOfWork Change Set.
-
preCommitTransaction
public void preCommitTransaction()
INTERNAL: Pre commit transaction.
-
preCommitUnitOfWork
public void preCommitUnitOfWork()
INTERNAL: Pre commit unit of work.
-
preFlushUnitOfWork
public void preFlushUnitOfWork()
INTERNAL: Pre flush unit of work.
-
preExecuteCall
public void preExecuteCall(Call call)
INTERNAL: Pre execute call.
-
preExecuteQuery
public void preExecuteQuery(DatabaseQuery query)
INTERNAL: Pre execute query.
-
preLogin
public void preLogin(Session session)
INTERNAL: Pre login to the session.
-
postLogin
public void postLogin(Session session)
INTERNAL: post login to the session.
-
preLogout
public void preLogout(Session session)
INTERNAL: Pre logout to the session.
-
postLogout
public void postLogout(Session session)
INTERNAL: post logout to the session.
-
prepareUnitOfWork
public void prepareUnitOfWork()
INTERNAL: Prepare unit of work.
-
preReleaseClientSession
public void preReleaseClientSession()
INTERNAL: Pre release client session.
-
preReleaseConnection
public void preReleaseConnection(org.eclipse.persistence.internal.databaseaccess.Accessor accessor)
INTERNAL: Raised before release a connection to a connection pool.
-
preReleaseExclusiveConnection
public void preReleaseExclusiveConnection(ClientSession clientSession, org.eclipse.persistence.internal.databaseaccess.Accessor accessor)
INTERNAL: This event is fired just before a Client Session, with isolated data, releases its Exclusive Connection
-
preReleaseUnitOfWork
public void preReleaseUnitOfWork()
INTERNAL: Pre release unit of work.
-
preRollbackTransaction
public void preRollbackTransaction()
INTERNAL: Pre rollback transaction.
-
preDistributedMergeUnitOfWorkChangeSet
public void preDistributedMergeUnitOfWorkChangeSet(org.eclipse.persistence.internal.sessions.UnitOfWorkChangeSet changeSet)
INTERNAL: Pre merge Distributed UnitOfWorkChangeSet
-
preMergeUnitOfWorkChangeSet
public void preMergeUnitOfWorkChangeSet(org.eclipse.persistence.internal.sessions.UnitOfWorkChangeSet changeSet)
INTERNAL: Pre merge UnitOfWorkChangeSet
-
removeListener
public void removeListener(SessionEventListener listener)
PUBLIC: Remove the event listener from the session. If session is a broker and the listener was in its list, then its members remove the listener, too.
-
setListeners
protected void setListeners(java.util.List<SessionEventListener> listeners)
The event listeners will receive all events raised by this session. Also unit of works acquire from this session will inherit the listeners.
-
setSession
public void setSession(Session session)
INTERNAL: Set the session for this session event manager
-
startOperationProfile
protected void startOperationProfile()
INTERNAL: Start call
-
endOperationProfile
protected void endOperationProfile()
INTERNAL: End call
-
-