org.postgresql.pljava
Class Session

java.lang.Object
  extended byorg.postgresql.pljava.Session
All Implemented Interfaces:
EOXactListener

public class Session
extends java.lang.Object
implements EOXactListener

An instance of this interface reflects the current session. The attribute store is transactional.


Constructor Summary
Session()
           
 
Method Summary
 void addTransactionListener(TransactionListener listener)
          Adds the specified listener to the list of listeners that will receive transactional events.
static Session current()
          Returns the current session.
 java.lang.Object getAttribute(java.lang.String attributeName)
           
static java.lang.String getSessionUserName()
          Return the session user.
 TransactionListener[] getTransactionListeners()
          Returns the list of listeners that will receive transactional events.
 java.lang.String getUserName()
          Return the current user.
 void onEOXact(boolean isCommit)
          Callback received from the backend when a transaction has ended.
 void removeAttribute(java.lang.String attributeName)
           
 void removeTransactionListener(TransactionListener listener)
          Removes the specified listener from the list of listeners that will receive transactional events.
 void setAttribute(java.lang.String attributeName, java.lang.Object value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Session

public Session()
Method Detail

addTransactionListener

public void addTransactionListener(TransactionListener listener)
Adds the specified listener to the list of listeners that will receive transactional events.


getAttribute

public java.lang.Object getAttribute(java.lang.String attributeName)

current

public static Session current()
Returns the current session.


getTransactionListeners

public TransactionListener[] getTransactionListeners()
Returns the list of listeners that will receive transactional events.


getUserName

public java.lang.String getUserName()
Return the current user.


getSessionUserName

public static java.lang.String getSessionUserName()
Return the session user.


onEOXact

public void onEOXact(boolean isCommit)
Description copied from interface: EOXactListener
Callback received from the backend when a transaction has ended.

Specified by:
onEOXact in interface EOXactListener
Parameters:
isCommit - Set to true if the commit was a success and false if the transaction aborted.

removeAttribute

public void removeAttribute(java.lang.String attributeName)

setAttribute

public void setAttribute(java.lang.String attributeName,
                         java.lang.Object value)

removeTransactionListener

public void removeTransactionListener(TransactionListener listener)
Removes the specified listener from the list of listeners that will receive transactional events.



Copyright (c) 2003, 2004 TADA AB - Taby Sweden. Distributed under the terms shown in COPYRIGHT