org.codehaus.wadi.core.contextualiser
Class BasicInvocation

java.lang.Object
  extended by org.codehaus.wadi.core.contextualiser.BasicInvocation
All Implemented Interfaces:
Invocation

public class BasicInvocation
extends java.lang.Object
implements Invocation

Version:
$Revision: 1538 $

Constructor Summary
BasicInvocation(java.lang.String sessionKey, long exclusiveSessionLockWaitTime)
           
 
Method Summary
protected  void doInvoke()
           
protected  void doInvoke(InvocationContext context)
           
 int getErrorCode()
           
 java.lang.String getErrorMessage()
           
 long getExclusiveSessionLockWaitTime()
           
 Session getSession()
           
 java.lang.String getSessionKey()
          Return the key carried by the Invocation associating it with server-side state - a Session
 void invoke()
          Actually make the encapsulated Invocation.
 void invoke(InvocationContext context)
           
 boolean isDoNotExecuteOnEndProcessing()
           
 boolean isErrored()
           
 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

BasicInvocation

public BasicInvocation(java.lang.String sessionKey,
                       long exclusiveSessionLockWaitTime)
Method Detail

getSession

public Session getSession()
Specified by:
getSession 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

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

invoke

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

doInvoke

protected void doInvoke()
                 throws InvocationException
Throws:
InvocationException

doInvoke

protected void doInvoke(InvocationContext context)
                 throws InvocationException
Throws:
InvocationException

isProxiedInvocation

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

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

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

setInvocationProxy

public void setInvocationProxy(InvocationProxy proxy)
Specified by:
setInvocationProxy 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

isErrored

public boolean isErrored()

getErrorCode

public int getErrorCode()

getErrorMessage

public java.lang.String getErrorMessage()

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.