Examples of HierarchicalState


Examples of org.jboss.jms.client.state.HierarchicalState

      // As fcc can be null on non-clustered connections we have to cache connectionState instead
      if (connectionState == null)
      {
         delegate = (DelegateSupport)invocation.getTargetObject();

         HierarchicalState hs = delegate.getState();
         while (hs != null && !(hs instanceof ConnectionState))
         {
            hs = hs.getParent();
         }
        
         connectionState = (ConnectionState)hs;
      }
     
View Full Code Here

Examples of org.jboss.jms.client.state.HierarchicalState

    *
    * @param invocation the invocation
    */
   protected void maintainRelatives(Invocation invocation)
   {                 
      HierarchicalState state = ((DelegateSupport)invocation.getTargetObject()).getState();
           
      // We use a clone to avoid a deadlock where requests are made to close parent and child
      // concurrently
     
      Set clone;

      Set children = state.getChildren();
     
      if (children == null)
      {
         if (trace) { log.trace(this + " has no children"); }
         return;
      }
     
      synchronized (children)
      {
         clone = new HashSet(children);
      }
     
      // Cycle through the children this will do a depth first close
      for (Iterator i = clone.iterator(); i.hasNext();)
      {
         HierarchicalState child = (HierarchicalState)i.next();     
         Closeable del = (Closeable)child.getDelegate();
         try
         {
            del.closing();
            del.close();
         }
View Full Code Here

Examples of org.jboss.jms.client.state.HierarchicalState

    *
    * @param invocation the invocation
    */
   protected void removeSelf(Invocation invocation)
   {                 
      HierarchicalState state = ((DelegateSupport)invocation.getTargetObject()).getState();
           
      HierarchicalState parent = state.getParent();
      if (parent != null)
      {                 
         parent.getChildren().remove(state);
      }
   }
View Full Code Here

Examples of org.jboss.jms.client.state.HierarchicalState

      // As fcc can be null on non-clustered connections we have to cache connectionState instead
      if (connectionState == null)
      {
         delegate = (DelegateSupport)invocation.getTargetObject();

         HierarchicalState hs = delegate.getState();
         while (hs != null && !(hs instanceof ConnectionState))
         {
            hs = hs.getParent();
         }
        
         connectionState = (ConnectionState)hs;
      }
     
View Full Code Here

Examples of org.jboss.jms.client.state.HierarchicalState

    *
    * @param invocation the invocation
    */
   protected void maintainRelatives(Invocation invocation)
   {                 
      HierarchicalState state = ((DelegateSupport)invocation.getTargetObject()).getState();
           
      // We use a clone to avoid a deadlock where requests are made to close parent and child
      // concurrently
     
      Set clone;

      Set children = state.getChildren();
     
      if (children == null)
      {
         if (trace) { log.trace(this + " has no children"); }
         return;
      }
     
      synchronized (children)
      {
         clone = new HashSet(children);
      }
     
      // Cycle through the children this will do a depth first close
      for (Iterator i = clone.iterator(); i.hasNext();)
      {
         HierarchicalState child = (HierarchicalState)i.next();     
         Closeable del = (Closeable)child.getDelegate();
         try
         {
            del.closing(-1);
            del.close();
         }
View Full Code Here

Examples of org.jboss.jms.client.state.HierarchicalState

    *
    * @param invocation the invocation
    */
   protected void removeSelf(Invocation invocation)
   {                 
      HierarchicalState state = ((DelegateSupport)invocation.getTargetObject()).getState();
           
      HierarchicalState parent = state.getParent();
      if (parent != null)
      {                 
         parent.getChildren().remove(state);
      }
   }
View Full Code Here

Examples of org.jboss.jms.client.state.HierarchicalState

                final JBossSession jbossSession = (JBossSession)session ;
                final SessionDelegate sessionDelegate = jbossSession.getDelegate() ;
                if (sessionDelegate instanceof ClientSessionDelegate)
                {
                    final ClientSessionDelegate clientSessionDelegate = (ClientSessionDelegate)sessionDelegate ;
                    final HierarchicalState state = clientSessionDelegate.getState() ;
                    if (state instanceof SessionState)
                    {
                        final SessionState sessionState = (SessionState)state ;
                        sessionState.getExecutor().restart() ;
                    }
View Full Code Here

Examples of org.jboss.jms.client.state.HierarchicalState

    *
    * @param invocation the invocation
    */
   protected void maintainRelatives(Invocation invocation)
   {                 
      HierarchicalState state = ((DelegateSupport)invocation.getTargetObject()).getState();
           
      // We use a clone to avoid a deadlock where requests are made to close parent and child
      // concurrently
     
      Set clone;

      Set children = state.getChildren();
     
      if (children == null)
      {
         if (trace) { log.trace(this + " has no children"); }
         return;
      }
     
      synchronized (children)
      {
         clone = new HashSet(children);
      }
     
      // Cycle through the children this will do a depth first close
      for (Iterator i = clone.iterator(); i.hasNext();)
      {
         HierarchicalState child = (HierarchicalState)i.next();     
         Closeable del = (Closeable)child.getDelegate();
         try
         {
            del.closing(-1);
            del.close();
         }
View Full Code Here

Examples of org.jboss.jms.client.state.HierarchicalState

    *
    * @param invocation the invocation
    */
   protected void removeSelf(Invocation invocation)
   {                 
      HierarchicalState state = ((DelegateSupport)invocation.getTargetObject()).getState();
           
      HierarchicalState parent = state.getParent();
      if (parent != null)
      {                 
         parent.getChildren().remove(state);
      }
   }
View Full Code Here

Examples of org.jboss.jms.client.state.HierarchicalState

/*     */     }
/*     */   }
/*     */
/*     */   protected void maintainRelatives(Invocation invocation)
/*     */   {
/* 278 */     HierarchicalState state = ((DelegateSupport)invocation.getTargetObject()).getState();
/*     */
/* 285 */     Set children = state.getChildren();
/*     */
/* 287 */     if (children == null)
/*     */     {
/* 289 */       if (this.trace) log.trace(this + " has no children");
/* 290 */       return;
/*     */     }
/*     */     Set clone;
/* 293 */     synchronized (children)
/*     */     {
/* 295 */       clone = new HashSet(children);
/*     */     }
/*     */
/* 299 */     for (Iterator i = clone.iterator(); i.hasNext(); )
/*     */     {
/* 301 */       HierarchicalState child = (HierarchicalState)i.next();
/* 302 */       Closeable del = (Closeable)child.getDelegate();
/*     */       try
/*     */       {
/* 305 */         del.closing(-1L);
/* 306 */         del.close();
/*     */       }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.