org.jboss.jms.client.container
Class ClosedInterceptor

java.lang.Object
  extended byorg.jboss.jms.client.container.ClosedInterceptor

public class ClosedInterceptor
extends java.lang.Object

An interceptor for checking closed state. It waits for other invocations to complete allowing the close.


Constructor Summary
ClosedInterceptor()
           
 
Method Summary
protected  boolean checkCloseAlreadyDone()
          Check the close has not already been done and wait for all invocations to complete
protected  boolean checkClosingAlreadyDone()
          Check the closing notification has not already been done
protected  void closed()
          Closed the object
protected  void closing()
          Closing the object
protected  void done()
          Mark the object as no longer inuse
 java.lang.String getName()
           
protected  void inuse()
          Mark the object as inuse
 java.lang.Object invoke(Invocation invocation)
           
protected  void maintainRelatives(Invocation invocation)
          Close children and remove from parent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClosedInterceptor

public ClosedInterceptor()
Method Detail

getName

public java.lang.String getName()

invoke

public java.lang.Object invoke(Invocation invocation)
                        throws java.lang.Throwable
Throws:
java.lang.Throwable

checkClosingAlreadyDone

protected boolean checkClosingAlreadyDone()
                                   throws java.lang.Throwable
Check the closing notification has not already been done

Returns:
true when already closing or closed
Throws:
java.lang.Throwable

closing

protected void closing()
                throws java.lang.Throwable
Closing the object

Throws:
java.lang.Throwable

checkCloseAlreadyDone

protected boolean checkCloseAlreadyDone()
                                 throws java.lang.Throwable
Check the close has not already been done and wait for all invocations to complete

Returns:
true when already closed
Throws:
java.lang.Throwable

closed

protected void closed()
               throws java.lang.Throwable
Closed the object

Throws:
java.lang.Throwable

inuse

protected void inuse()
              throws java.lang.Throwable
Mark the object as inuse

Throws:
java.lang.Throwable

done

protected void done()
             throws java.lang.Throwable
Mark the object as no longer inuse

Throws:
java.lang.Throwable

maintainRelatives

protected void maintainRelatives(Invocation invocation)
Close children and remove from parent

Parameters:
invocation - the invocation