org.jboss.ejb.plugins.inflow
Class MessageEndpointInterceptor

java.lang.Object
  extended byorg.jboss.proxy.Interceptor (src) 
      extended byorg.jboss.ejb.plugins.inflow.MessageEndpointInterceptor
All Implemented Interfaces:
java.io.Externalizable, java.io.Serializable

public class MessageEndpointInterceptor
extends Interceptor (src)

Implements the application server message endpoint requirements.

See Also:
Serialized Form

Field Summary
protected  boolean delivered
          Whether we have delivered a message
protected  java.lang.Thread inUseThread
          The in use thread
static java.lang.String MESSAGE_ENDPOINT_FACTORY
          The key for the factory
static java.lang.String MESSAGE_ENDPOINT_XARESOURCE
          The key for the xa resource
protected  java.lang.ClassLoader oldClassLoader
          The old classloader of the thread
protected  SynchronizedBoolean released
          Whether this proxy has been released
protected  Transaction (src) suspended
          Any suspended transaction
protected  Transaction (src) transaction
          Any transaction we started
 
Fields inherited from class org.jboss.proxy.Interceptor (src)
nextInterceptor
 
Constructor Summary
MessageEndpointInterceptor()
           
 
Method Summary
protected  void after(Invocation (src)  mi)
          After delivery processing.
protected  void before(Invocation (src)  mi)
          Before delivery processing.
protected  java.lang.Object delivery(Invocation (src)  mi)
          Delivery.
protected  void endTransaction(Invocation (src)  mi, boolean commit)
          End the transaction
protected  void finish(java.lang.String context, Invocation (src)  mi, boolean commit)
          Finish the current delivery
protected  MessageDrivenContainer (src) getContainer(Invocation (src)  mi)
          Get the container
protected  JBossMessageEndpointFactory (src) getMessageEndpointFactory(Invocation (src)  mi)
          Get the message endpoint factory
protected  java.lang.String getProxyString(Invocation (src)  mi)
          Get our proxy's string value.
 java.lang.Object invoke(Invocation (src)  mi)
           
protected  void release(Invocation (src)  mi)
          Release this message endpoint.
protected  void releaseThreadLock(Invocation (src)  mi)
          Release the thread lock
protected  void resetContextClassLoader(Invocation (src)  mi)
          Reset the context classloader
protected  void startTransaction(java.lang.String context, Invocation (src)  mi, MessageDrivenContainer (src)  container)
          Start a transaction
 
Methods inherited from class org.jboss.proxy.Interceptor (src)
getNext, readExternal, setNext, writeExternal
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MESSAGE_ENDPOINT_FACTORY

public static final java.lang.String MESSAGE_ENDPOINT_FACTORY
The key for the factory

See Also:
Constant Field Values (src)

MESSAGE_ENDPOINT_XARESOURCE

public static final java.lang.String MESSAGE_ENDPOINT_XARESOURCE
The key for the xa resource

See Also:
Constant Field Values (src)

released

protected SynchronizedBoolean released
Whether this proxy has been released


delivered

protected boolean delivered
Whether we have delivered a message


inUseThread

protected java.lang.Thread inUseThread
The in use thread


oldClassLoader

protected java.lang.ClassLoader oldClassLoader
The old classloader of the thread


transaction

protected Transaction (src)  transaction
Any transaction we started


suspended

protected Transaction (src)  suspended
Any suspended transaction

Constructor Detail

MessageEndpointInterceptor

public MessageEndpointInterceptor()
Method Detail

invoke

public java.lang.Object invoke(Invocation (src)  mi)
                        throws java.lang.Throwable
Specified by:
invoke in class Interceptor (src)
Throws:
java.lang.Throwable

release

protected void release(Invocation (src)  mi)
                throws java.lang.Throwable
Release this message endpoint.

Parameters:
mi - the invocation
Throws:
java.lang.Throwable - for any error

before

protected void before(Invocation (src)  mi)
               throws java.lang.Throwable
Before delivery processing.

Parameters:
mi - the invocation
Throws:
java.lang.Throwable - for any error

after

protected void after(Invocation (src)  mi)
              throws java.lang.Throwable
After delivery processing.

Parameters:
mi - the invocation
Throws:
java.lang.Throwable - for any error

delivery

protected java.lang.Object delivery(Invocation (src)  mi)
                             throws java.lang.Throwable
Delivery.

Parameters:
mi - the invocation
Returns:
the result of the delivery
Throws:
java.lang.Throwable - for any error

finish

protected void finish(java.lang.String context,
                      Invocation (src)  mi,
                      boolean commit)
               throws java.lang.Throwable
Finish the current delivery

Parameters:
context - the lifecycle method
mi - the invocation
commit - whether to commit
Throws:
java.lang.Throwable - for any error

startTransaction

protected void startTransaction(java.lang.String context,
                                Invocation (src)  mi,
                                MessageDrivenContainer (src)  container)
                         throws java.lang.Throwable
Start a transaction

Parameters:
context - the lifecycle method
mi - the invocation
container - the container
Throws:
java.lang.Throwable - for any error

endTransaction

protected void endTransaction(Invocation (src)  mi,
                              boolean commit)
                       throws java.lang.Throwable
End the transaction

Parameters:
mi - the invocation
commit - whether to try to commit
Throws:
java.lang.Throwable - for any error

resetContextClassLoader

protected void resetContextClassLoader(Invocation (src)  mi)
Reset the context classloader

Parameters:
mi - the invocation

releaseThreadLock

protected void releaseThreadLock(Invocation (src)  mi)
Release the thread lock

Parameters:
mi - the invocation

getProxyString

protected java.lang.String getProxyString(Invocation (src)  mi)
Get our proxy's string value.

Parameters:
mi - the invocation
Returns:
the string

getMessageEndpointFactory

protected JBossMessageEndpointFactory (src)  getMessageEndpointFactory(Invocation (src)  mi)
Get the message endpoint factory

Returns:
the message endpoint factory

getContainer

protected MessageDrivenContainer (src)  getContainer(Invocation (src)  mi)
Get the container

Returns:
the container