Package org.jboss.aop.joinpoint

Examples of org.jboss.aop.joinpoint.MethodInvocation


   }

   public Object handleReceive(Invocation invocation) throws Throwable
   {
      MethodInvocation mi = (MethodInvocation)invocation;
      Object[] args = mi.getArguments();
      long timeout = (args == null || args.length==0) ? 0 : ((Long)args[0]).longValue();
     
      return getClientConsumer(invocation).receive(timeout);
   }
View Full Code Here


      return getClientConsumer(invocation).receive(-1);
   }
  
   public Object handleSetMessageListener(Invocation invocation) throws Throwable
   {  
      MethodInvocation mi = (MethodInvocation)invocation;
      Object[] args = mi.getArguments();
      MessageListener l = (MessageListener)args[0];
     
      getClientConsumer(invocation).setMessageListener(l);
     
      return null;
View Full Code Here

      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();

      boolean isCC = false;
      if (mi.getArguments().length >= 4)
      {
         isCC = ((Boolean)mi.getArguments()[3]).booleanValue();
      }

      SessionState sessionState =
         new SessionState(connectionState, sessionDelegate, transacted,
                          ackMode, xa, sessionDelegate.getDupsOKBatchSize(),
View Full Code Here

      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();
View Full Code Here

      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);

      if (sessionState.isEnableOrderingGroup())
      {
View Full Code Here

      return producerDelegate;
   }

   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);
View Full Code Here

  
   // Public --------------------------------------------------------
  
   public Object handleClosing(Invocation invocation) throws Throwable
   {
      MethodInvocation mi = (MethodInvocation)invocation;
      SessionState state = getState(invocation);
      SessionDelegate del = (SessionDelegate)mi.getTargetObject();
           
      if (trace) { log.trace("handleClosing()"); }

      //Sanity check
      if (state.isXA() && !isXAAndConsideredNonTransacted(state))
View Full Code Here

   
   }
  
   public Object handlePreDeliver(Invocation invocation) throws Throwable
   {
      MethodInvocation mi = (MethodInvocation)invocation;
      SessionState state = getState(invocation);
     
      boolean result = true;
     
      synchronized (state)
      {
     
         int ackMode = state.getAcknowledgeMode();
        
         Object[] args = mi.getArguments();
         DeliveryInfo info = (DeliveryInfo)args[0];
        
         if (ackMode == Session.CLIENT_ACKNOWLEDGE)
         {
            // We collect acknowledgments in the list
View Full Code Here

      return Boolean.valueOf(result);
   }
  
   public Object handlePostDeliver(Invocation invocation) throws Throwable
   {
      MethodInvocation mi = (MethodInvocation)invocation;
      SessionState state = getState(invocation);
     
      synchronized (state)
      {
        
         int ackMode = state.getAcknowledgeMode();
        
         SessionDelegate sd = (SessionDelegate)mi.getTargetObject();
        
         boolean res = true;
  
         // if XA and there is no transaction enlisted on XA we will act as AutoAcknowledge
         // However if it's a MDB (if there is a DistinguishedListener) we should behaved as transacted
View Full Code Here

   }
  
   //JBMESSAGING-1876
   public Object handleProcessMessageTimeout(Invocation invocation) throws Throwable
   {
      MethodInvocation mi = (MethodInvocation)invocation;
      SessionState state = getState(invocation);
     
      boolean result = true;
     
      synchronized (state)
View Full Code Here

TOP

Related Classes of org.jboss.aop.joinpoint.MethodInvocation

Copyright © 2018 www.massapicom. 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.