org.codehaus.wadi.web.impl
Class WebInvocation

java.lang.Object
  extended by org.codehaus.wadi.web.impl.WebInvocation
All Implemented Interfaces:
Invocation

public class WebInvocation
extends java.lang.Object
implements Invocation

Version:
$Revision: 1430 $

Constructor Summary
WebInvocation()
           
WebInvocation(long exclusiveSessionLockWaitTime)
           
 
Method Summary
 javax.servlet.FilterChain getChain()
           
 long getExclusiveSessionLockWaitTime()
           
 javax.servlet.http.HttpServletRequest getHreq()
           
 javax.servlet.http.HttpServletResponse getHres()
           
 Session getSession()
           
 java.lang.String getSessionKey()
          Return the key carried by the Invocation associating it with server-side state - a Session
 void init(javax.servlet.http.HttpServletRequest hreq, javax.servlet.http.HttpServletResponse hres, javax.servlet.FilterChain chain)
          Initialise this WebInvocation for action after being taken from a Pool
 void invoke()
          Actually make the encapsulated Invocation.
 void invoke(InvocationContext wrapper)
           
 boolean isDoNotExecuteOnEndProcessing()
           
 boolean isErrorIfSessionNotAcquired()
           
 boolean isProxiedInvocation()
           
 boolean isRelocatable()
          Does this Invocation know how to 'relocate' itself to another EndPoint ?
 InvocationContext newContext(Session context)
           
 void relocate(org.codehaus.wadi.group.EndPoint endPoint)
          Ask this Invocation to relocate itself to a given EndPoint
 void sendError(int code, java.lang.String message)
          Send an error back to the client from which the Invocation originated
 void setDoNotExecuteOnEndProcessing(boolean doNotExecuteOnEndProcessing)
           
 void setErrorIfSessionNotAcquired(boolean errorIfSessionNotAcquired)
           
 void setInvocationProxy(InvocationProxy proxy)
           
 void setSession(Session session)
          Attach the relevant Session to this Invocation for its lifetime
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WebInvocation

public WebInvocation()

WebInvocation

public WebInvocation(long exclusiveSessionLockWaitTime)
Method Detail

init

public void init(javax.servlet.http.HttpServletRequest hreq,
                 javax.servlet.http.HttpServletResponse hres,
                 javax.servlet.FilterChain chain)
Initialise this WebInvocation for action after being taken from a Pool

Parameters:
hreq -
hres -
chain -

setInvocationProxy

public void setInvocationProxy(InvocationProxy proxy)
Specified by:
setInvocationProxy in interface Invocation

getSessionKey

public java.lang.String getSessionKey()
Description copied from interface: Invocation
Return the key carried by the Invocation associating it with server-side state - a Session

Specified by:
getSessionKey in interface Invocation
Returns:
the key

sendError

public void sendError(int code,
                      java.lang.String message)
               throws InvocationException
Description copied from interface: Invocation
Send an error back to the client from which the Invocation originated

Specified by:
sendError in interface Invocation
Parameters:
code - an error code
message - an error message
Throws:
InvocationException

isRelocatable

public boolean isRelocatable()
Description copied from interface: Invocation
Does this Invocation know how to 'relocate' itself to another EndPoint ?

Specified by:
isRelocatable in interface Invocation
Returns:
whether the Invocation is capable of relocating itself.

relocate

public void relocate(org.codehaus.wadi.group.EndPoint endPoint)
              throws InvocationException
Description copied from interface: Invocation
Ask this Invocation to relocate itself to a given EndPoint

Specified by:
relocate in interface Invocation
Parameters:
endPoint - the EndPoint
Throws:
InvocationException

isProxiedInvocation

public boolean isProxiedInvocation()
Specified by:
isProxiedInvocation in interface Invocation

invoke

public void invoke(InvocationContext wrapper)
            throws InvocationException
Specified by:
invoke in interface Invocation
Throws:
InvocationException

invoke

public void invoke()
            throws InvocationException
Description copied from interface: Invocation
Actually make the encapsulated Invocation. Called when required environment has been prepared - i.e. Session has been locked into memory and attached to the Invocation via setSession().

Specified by:
invoke in interface Invocation
Throws:
InvocationException

getChain

public javax.servlet.FilterChain getChain()

getHreq

public javax.servlet.http.HttpServletRequest getHreq()

getHres

public javax.servlet.http.HttpServletResponse getHres()

getSession

public Session getSession()
Specified by:
getSession in interface Invocation

setSession

public void setSession(Session session)
Description copied from interface: Invocation
Attach the relevant Session to this Invocation for its lifetime

Specified by:
setSession in interface Invocation
Parameters:
session - The Session

isErrorIfSessionNotAcquired

public boolean isErrorIfSessionNotAcquired()
Specified by:
isErrorIfSessionNotAcquired in interface Invocation

setErrorIfSessionNotAcquired

public void setErrorIfSessionNotAcquired(boolean errorIfSessionNotAcquired)
Specified by:
setErrorIfSessionNotAcquired in interface Invocation

getExclusiveSessionLockWaitTime

public long getExclusiveSessionLockWaitTime()
Specified by:
getExclusiveSessionLockWaitTime in interface Invocation

isDoNotExecuteOnEndProcessing

public boolean isDoNotExecuteOnEndProcessing()

setDoNotExecuteOnEndProcessing

public void setDoNotExecuteOnEndProcessing(boolean doNotExecuteOnEndProcessing)

newContext

public InvocationContext newContext(Session context)
Specified by:
newContext in interface Invocation


Copyright © 2010. All Rights Reserved.