org.infogrid.jee.shell.http
Interface HttpShellHandler

All Known Implementing Classes:
AbstractHttpShellHandler

public interface HttpShellHandler

Implemented by classes that would like to take action before, during, or after regular HttpShell processing.


Method Summary
 void afterAccess(org.infogrid.util.http.SaneRequest request, java.util.Map<java.lang.String,org.infogrid.mesh.MeshObject> vars, org.infogrid.util.SmartFactory<org.infogrid.meshbase.MeshBase,org.infogrid.meshbase.transaction.OnDemandTransaction,java.lang.Void> txs, org.infogrid.meshbase.MeshBase defaultMeshBase)
          Invoked by the HttpShell after MeshObjects were accessed, but before any property setting or relationship management takes place.
 java.lang.String afterTransactionEnd(org.infogrid.util.http.SaneRequest request, java.util.Map<java.lang.String,org.infogrid.mesh.MeshObject> vars, org.infogrid.util.SmartFactory<org.infogrid.meshbase.MeshBase,org.infogrid.meshbase.transaction.OnDemandTransaction,java.lang.Void> txs, org.infogrid.meshbase.MeshBase defaultMeshBase, java.lang.Throwable maybeThrown)
          Invoked by the HttpShell after the Transactions have been closed.
 void afterTransactionStart(org.infogrid.util.http.SaneRequest request, org.infogrid.util.SmartFactory<org.infogrid.meshbase.MeshBase,org.infogrid.meshbase.transaction.OnDemandTransaction,java.lang.Void> txs, org.infogrid.meshbase.MeshBase defaultMeshBase)
          Invoked by the HttpShell after any Transaction was created, but before any processing within the transaction takes place.
 void beforeTransactionEnd(org.infogrid.util.http.SaneRequest request, java.util.Map<java.lang.String,org.infogrid.mesh.MeshObject> vars, org.infogrid.util.SmartFactory<org.infogrid.meshbase.MeshBase,org.infogrid.meshbase.transaction.OnDemandTransaction,java.lang.Void> txs, org.infogrid.meshbase.MeshBase defaultMeshBase)
          Invoked by the HttpShell before Transactions are closed.
 void beforeTransactionStart(org.infogrid.util.http.SaneRequest request, org.infogrid.meshbase.MeshBase defaultMeshBase)
          Invoked by the HttpShell before any other processing takes place.
 java.lang.String getName()
          Obtain the name of the handler.
 

Method Detail

getName

java.lang.String getName()
Obtain the name of the handler.

Returns:
the name1

beforeTransactionStart

void beforeTransactionStart(org.infogrid.util.http.SaneRequest request,
                            org.infogrid.meshbase.MeshBase defaultMeshBase)
                            throws HttpShellException
Invoked by the HttpShell before any other processing takes place.

Parameters:
request - the incoming request
defaultMeshBase - the default MeshBase to use
Throws:
HttpShellException - a problem occurred, check cause for details

afterTransactionStart

void afterTransactionStart(org.infogrid.util.http.SaneRequest request,
                           org.infogrid.util.SmartFactory<org.infogrid.meshbase.MeshBase,org.infogrid.meshbase.transaction.OnDemandTransaction,java.lang.Void> txs,
                           org.infogrid.meshbase.MeshBase defaultMeshBase)
                           throws HttpShellException,
                                  org.infogrid.meshbase.transaction.TransactionException
Invoked by the HttpShell after any Transaction was created, but before any processing within the transaction takes place.

Parameters:
request - the incoming request
txs - the Transactions used by this invocation of the HttpShell so far at the time of invocation of this method
defaultMeshBase - the default MeshBase to use
Throws:
HttpShellException - a problem occurred, check cause for details
org.infogrid.meshbase.transaction.TransactionException - a problem with the Transaction occurred

afterAccess

void afterAccess(org.infogrid.util.http.SaneRequest request,
                 java.util.Map<java.lang.String,org.infogrid.mesh.MeshObject> vars,
                 org.infogrid.util.SmartFactory<org.infogrid.meshbase.MeshBase,org.infogrid.meshbase.transaction.OnDemandTransaction,java.lang.Void> txs,
                 org.infogrid.meshbase.MeshBase defaultMeshBase)
                 throws HttpShellException,
                        org.infogrid.meshbase.transaction.TransactionException
Invoked by the HttpShell after MeshObjects were accessed, but before any property setting or relationship management takes place.

Parameters:
request - the incoming request
vars - the variables set by the HttpShell
txs - the Transactions used by this invocation of the HttpShell
defaultMeshBase - the default MeshBase to use
Throws:
HttpShellException - a problem occurred, check cause for details
org.infogrid.meshbase.transaction.TransactionException - a problem with the Transaction occurred

beforeTransactionEnd

void beforeTransactionEnd(org.infogrid.util.http.SaneRequest request,
                          java.util.Map<java.lang.String,org.infogrid.mesh.MeshObject> vars,
                          org.infogrid.util.SmartFactory<org.infogrid.meshbase.MeshBase,org.infogrid.meshbase.transaction.OnDemandTransaction,java.lang.Void> txs,
                          org.infogrid.meshbase.MeshBase defaultMeshBase)
                          throws HttpShellException,
                                 org.infogrid.meshbase.transaction.TransactionException
Invoked by the HttpShell before Transactions are closed.

Parameters:
request - the incoming request
vars - the variables set by the HttpShell
txs - the Transactions used by this invocation of the HttpShell
defaultMeshBase - the default MeshBase to use
Throws:
HttpShellException - a problem occurred, check cause for details
org.infogrid.meshbase.transaction.TransactionException - a problem with the Transaction occurred

afterTransactionEnd

java.lang.String afterTransactionEnd(org.infogrid.util.http.SaneRequest request,
                                     java.util.Map<java.lang.String,org.infogrid.mesh.MeshObject> vars,
                                     org.infogrid.util.SmartFactory<org.infogrid.meshbase.MeshBase,org.infogrid.meshbase.transaction.OnDemandTransaction,java.lang.Void> txs,
                                     org.infogrid.meshbase.MeshBase defaultMeshBase,
                                     java.lang.Throwable maybeThrown)
                                     throws HttpShellException
Invoked by the HttpShell after the Transactions have been closed.

Parameters:
request - the incoming request
vars - the variables set by the HttpShell
txs - the (now closed) Transactions used by this invocation of the HttpShell
defaultMeshBase - the default MeshBase to use
maybeThrown - if a Throwable was thrown, it is passed here
Returns:
a URL where to redirect to, or null
Throws:
HttpShellException - a problem occurred, check cause for details