Examples of DelegateSupport


Examples of org.jboss.jms.client.delegate.DelegateSupport

   }

   public Object handleCreateConsumerDelegate(Invocation invocation) throws Throwable
   {
      ClientConsumerDelegate consumerDelegate = (ClientConsumerDelegate)invocation.invokeNext();
      DelegateSupport delegate = (DelegateSupport)consumerDelegate;

      SessionState sessionState = (SessionState)getState(invocation);

      MethodInvocation mi = (MethodInvocation)invocation;
      JBossDestination dest = (JBossDestination)mi.getArguments()[0];
      String selector = (String)mi.getArguments()[1];
      boolean noLocal = ((Boolean)mi.getArguments()[2]).booleanValue();
      String subscriptionName = (String)mi.getArguments()[3];
      boolean connectionConsumer = ((Boolean)mi.getArguments()[4]).booleanValue();

      String consumerID = consumerDelegate.getID();
      int bufferSize = consumerDelegate.getBufferSize();
      int maxDeliveries = consumerDelegate.getMaxDeliveries();
      long redeliveryDelay = consumerDelegate.getRedeliveryDelay();

      ConsumerState consumerState =
         new ConsumerState(sessionState, consumerDelegate, dest, selector, noLocal,
                           subscriptionName, consumerID, connectionConsumer, bufferSize,
                           maxDeliveries, redeliveryDelay);

      delegate.setState(consumerState);
      return consumerDelegate;
   }
View Full Code Here

Examples of org.jboss.jms.client.delegate.DelegateSupport

   public Object handleCreateProducerDelegate(Invocation invocation) throws Throwable
   {
      // ProducerDelegates are not created on the server

      ProducerDelegate producerDelegate = new ClientProducerDelegate();
      DelegateSupport delegate = (DelegateSupport)producerDelegate;

      SessionState sessionState = (SessionState)getState(invocation);

      MethodInvocation mi = (MethodInvocation)invocation;
      Destination dest = ((Destination)mi.getArguments()[0]);

      ProducerState producerState = new ProducerState(sessionState, producerDelegate, dest);

      delegate.setState(producerState);

      // send an arbitrary invocation into the producer delegate, this will trigger AOP stack
      // initialization and AOP aspect class loading, using the "good" class loader, which is set
      // now. This will save us from having to switch the thread context class loader on every send.
      producerDelegate.getDeliveryMode();
View Full Code Here

Examples of org.jboss.jms.client.delegate.DelegateSupport

   public Object handleCreateBrowserDelegate(Invocation invocation) throws Throwable
   {
      MethodInvocation mi = (MethodInvocation)invocation;

      ClientBrowserDelegate browserDelegate = (ClientBrowserDelegate)invocation.invokeNext();
      DelegateSupport delegate = (DelegateSupport)browserDelegate;

      SessionState sessionState = (SessionState)getState(invocation);

      JBossDestination destination = (JBossDestination)mi.getArguments()[0];
      String selector = (String)mi.getArguments()[1];

      BrowserState state =
         new BrowserState(sessionState, browserDelegate, destination, selector);

      delegate.setState(state);
      return browserDelegate;
   }
View Full Code Here

Examples of org.jboss.jms.client.delegate.DelegateSupport

         throw new Exception("Connection not an instance of JBossConnection");
      }
     
      JBossConnection jbconn = (JBossConnection)conn;
     
      DelegateSupport del = (DelegateSupport)jbconn.getDelegate();
     
      ConnectionState state = (ConnectionState)del.getState();
     
      return state.getServerID();
   }
View Full Code Here

Examples of org.jboss.jms.client.delegate.DelegateSupport

   }

   public Object handleCreateSessionDelegate(Invocation invocation) throws Throwable
   {
      ClientSessionDelegate sessionDelegate = (ClientSessionDelegate)invocation.invokeNext();
      DelegateSupport delegate = (DelegateSupport)sessionDelegate;

      ConnectionState connectionState = (ConnectionState)getState(invocation);

      MethodInvocation mi = (MethodInvocation)invocation;
      boolean transacted = ((Boolean)mi.getArguments()[0]).booleanValue();
      int ackMode = ((Integer)mi.getArguments()[1]).intValue();
      boolean xa = ((Boolean)mi.getArguments()[2]).booleanValue();

      SessionState sessionState =
         new SessionState(connectionState, sessionDelegate, transacted,
                          ackMode, xa, sessionDelegate.getDupsOKBatchSize());

      delegate.setState(sessionState);
      return delegate;
   }
View Full Code Here

Examples of org.jboss.jms.client.delegate.DelegateSupport

   }

   public Object handleCreateConsumerDelegate(Invocation invocation) throws Throwable
   {
      ClientConsumerDelegate consumerDelegate = (ClientConsumerDelegate)invocation.invokeNext();
      DelegateSupport delegate = (DelegateSupport)consumerDelegate;

      SessionState sessionState = (SessionState)getState(invocation);

      MethodInvocation mi = (MethodInvocation)invocation;
      JBossDestination dest = (JBossDestination)mi.getArguments()[0];
      String selector = (String)mi.getArguments()[1];
      boolean noLocal = ((Boolean)mi.getArguments()[2]).booleanValue();
      String subscriptionName = (String)mi.getArguments()[3];
      boolean connectionConsumer = ((Boolean)mi.getArguments()[4]).booleanValue();

      String consumerID = consumerDelegate.getID();
      int bufferSize = consumerDelegate.getBufferSize();
      int maxDeliveries = consumerDelegate.getMaxDeliveries();
      long redeliveryDelay = consumerDelegate.getRedeliveryDelay();

      ConsumerState consumerState =
         new ConsumerState(sessionState, consumerDelegate, dest, selector, noLocal,
                           subscriptionName, consumerID, connectionConsumer, bufferSize,
                           maxDeliveries, redeliveryDelay);

      delegate.setState(consumerState);
      return consumerDelegate;
   }
View Full Code Here

Examples of org.jboss.jms.client.delegate.DelegateSupport

   public Object handleCreateProducerDelegate(Invocation invocation) throws Throwable
   {
      // ProducerDelegates are not created on the server

      ProducerDelegate producerDelegate = new ClientProducerDelegate();
      DelegateSupport delegate = (DelegateSupport)producerDelegate;

      SessionState sessionState = (SessionState)getState(invocation);

      MethodInvocation mi = (MethodInvocation)invocation;
      Destination dest = ((Destination)mi.getArguments()[0]);

      ProducerState producerState = new ProducerState(sessionState, producerDelegate, dest);

      delegate.setState(producerState);

      // send an arbitrary invocation into the producer delegate, this will trigger AOP stack
      // initialization and AOP aspect class loading, using the "good" class loader, which is set
      // now. This will save us from having to switch the thread context class loader on every send.
      producerDelegate.getDeliveryMode();
View Full Code Here

Examples of org.jboss.jms.client.delegate.DelegateSupport

   public Object handleCreateBrowserDelegate(Invocation invocation) throws Throwable
   {
      MethodInvocation mi = (MethodInvocation)invocation;

      ClientBrowserDelegate browserDelegate = (ClientBrowserDelegate)invocation.invokeNext();
      DelegateSupport delegate = (DelegateSupport)browserDelegate;

      SessionState sessionState = (SessionState)getState(invocation);

      JBossDestination destination = (JBossDestination)mi.getArguments()[0];
      String selector = (String)mi.getArguments()[1];

      BrowserState state =
         new BrowserState(sessionState, browserDelegate, destination, selector);

      delegate.setState(state);
      return browserDelegate;
   }
View Full Code Here

Examples of org.jboss.jms.client.delegate.DelegateSupport

         throw new Exception("Connection not an instance of JBossConnection");
      }
     
      JBossConnection jbconn = (JBossConnection)conn;
     
      DelegateSupport del = (DelegateSupport)jbconn.getDelegate();
     
      ConnectionState state = (ConnectionState)del.getState();
     
      return state.getServerID();
   }
View Full Code Here

Examples of org.jboss.jms.client.delegate.DelegateSupport

   /**
    * make sure the session's ackMap is cleared.
    */
   private void checkSessionAckMap(JBossSession session)
   {
      DelegateSupport support = (DelegateSupport)session.getDelegate();
      SessionState state = (SessionState)support.getState();
      assertEquals(0, state.getAckMap().size());
   }
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.