jPOS 1.6.5 API Documentation

org.jpos.transaction
Class Context

java.lang.Object
  extended by org.jpos.transaction.Context
All Implemented Interfaces:
java.io.Externalizable, java.io.Serializable, Pausable, Loggeable

@Persistent
public class Context
extends java.lang.Object
implements java.io.Externalizable, Loggeable, Pausable

See Also:
Serialized Form

Field Summary
static java.lang.String LOGEVT
           
static java.lang.String PAUSED_TRANSACTION
           
static java.lang.String PROFILER
           
 
Constructor Summary
Context()
           
 
Method Summary
 void checkPoint(java.lang.String detail)
          add a checkpoint to the profiler
 void dump(java.io.PrintStream p, java.lang.String indent)
           
 java.lang.Object get(java.lang.Object key)
          Get
 java.lang.Object get(java.lang.Object key, long timeout)
          persistent get with timeout
 java.lang.Object get(java.lang.Object key, java.lang.Object defValue)
           
 LogEvent getLogEvent()
          return a LogEvent used to store trace information about this transaction.
 java.util.Map getMap()
           
 PausedTransaction getPausedTransaction()
           
 Profiler getProfiler()
          return (or creates) a Profiler object
 java.lang.String getString(java.lang.Object key)
           
 java.lang.String getString(java.lang.Object key, java.lang.Object defValue)
           
 long getTimeout()
           
 void log(java.lang.Object msg)
          adds a trace message
 void put(java.lang.Object key, java.lang.Object value)
          puts an Object in the transient Map
 void put(java.lang.Object key, java.lang.Object value, boolean persist)
          puts an Object in the transient Map
 void readExternal(java.io.ObjectInput in)
           
 java.lang.Object remove(java.lang.Object key)
          Transient remove
 void resume()
           
 void setPausedTransaction(PausedTransaction p)
           
 void setTimeout(long timeout)
           
 void writeExternal(java.io.ObjectOutput out)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOGEVT

public static java.lang.String LOGEVT

PROFILER

public static java.lang.String PROFILER

PAUSED_TRANSACTION

public static java.lang.String PAUSED_TRANSACTION
Constructor Detail

Context

public Context()
Method Detail

put

public void put(java.lang.Object key,
                java.lang.Object value)
puts an Object in the transient Map


put

public void put(java.lang.Object key,
                java.lang.Object value,
                boolean persist)
puts an Object in the transient Map


get

public java.lang.Object get(java.lang.Object key)
Get


get

public java.lang.Object get(java.lang.Object key,
                            java.lang.Object defValue)

remove

public java.lang.Object remove(java.lang.Object key)
Transient remove


getString

public java.lang.String getString(java.lang.Object key)

getString

public java.lang.String getString(java.lang.Object key,
                                  java.lang.Object defValue)

dump

public void dump(java.io.PrintStream p,
                 java.lang.String indent)
Specified by:
dump in interface Loggeable

get

public java.lang.Object get(java.lang.Object key,
                            long timeout)
persistent get with timeout

Parameters:
key - the key
timeout - timeout
Returns:
object (null on timeout)

writeExternal

public void writeExternal(java.io.ObjectOutput out)
                   throws java.io.IOException
Specified by:
writeExternal in interface java.io.Externalizable
Throws:
java.io.IOException

readExternal

public void readExternal(java.io.ObjectInput in)
                  throws java.io.IOException,
                         java.lang.ClassNotFoundException
Specified by:
readExternal in interface java.io.Externalizable
Throws:
java.io.IOException
java.lang.ClassNotFoundException

getMap

public java.util.Map getMap()
Returns:
transient map

getLogEvent

public LogEvent getLogEvent()
return a LogEvent used to store trace information about this transaction. If there's no LogEvent there, it creates one.

Returns:
LogEvent

getProfiler

public Profiler getProfiler()
return (or creates) a Profiler object

Returns:
Profiler object

log

public void log(java.lang.Object msg)
adds a trace message


checkPoint

public void checkPoint(java.lang.String detail)
add a checkpoint to the profiler


setPausedTransaction

public void setPausedTransaction(PausedTransaction p)
Specified by:
setPausedTransaction in interface Pausable

getPausedTransaction

public PausedTransaction getPausedTransaction()
Specified by:
getPausedTransaction in interface Pausable

setTimeout

public void setTimeout(long timeout)
Specified by:
setTimeout in interface Pausable

getTimeout

public long getTimeout()
Specified by:
getTimeout in interface Pausable

resume

public void resume()
Specified by:
resume in interface Pausable

jPOS.org