Package org.jboss.aop.joinpoint

Examples of org.jboss.aop.joinpoint.MethodInvocation


      }

      // the method handles both the case of a first connection creation attempt and a retry during
      // a client-side failover. The difference is given by the failedNodeID (-1 for first attempt)

      MethodInvocation mi = (MethodInvocation)invocation;
      String username = (String)mi.getArguments()[0];
      String password = (String)mi.getArguments()[1];
      Integer failedNodeID = (Integer)mi.getArguments()[2];

      // We attempt to connect to the next node in a loop, since we might need to go through
      // multiple hops

      int attemptCount = 0;
View Full Code Here


  
   // Public ---------------------------------------------------------------------------------------

   public Object handleSend(Invocation invocation) throws Throwable
   {
      MethodInvocation mi = (MethodInvocation)invocation;
     
      Object[] args = mi.getArguments();
     
      Destination destination = (Destination)args[0];
      Message m = (Message)args[1];
      int deliveryMode = ((Integer)args[2]).intValue();
      int priority = ((Integer)args[3]).intValue();
View Full Code Here

   // Public ---------------------------------------------------------------------------------------

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

      ConsumerDelegate consumerDelegate = (ConsumerDelegate)invocation.invokeNext();

      boolean isCC = ((Boolean)mi.getArguments()[4]).booleanValue();

      // Create the message handler
      SessionState sessionState =
         (SessionState)((DelegateSupport)invocation.getTargetObject()).getState();
      ConnectionState connectionState = (ConnectionState)sessionState.getParent();
View Full Code Here

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

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

         {
            log.trace("invoking non-method invocation: " + invocation);
         }
         else
         {
            MethodInvocation mi = (MethodInvocation)invocation;
            method = mi.getMethod();
            methodName = method.getName();
            StringBuffer sb = new StringBuffer();
            sb.append("invoking ").append(target).append('.').append(methodName).append('(');
            Object[] args = mi.getArguments();
            if (args != null)
            {
               for(int i = 0; i < args.length; i++)
               {
                  // special precaution to hide passwords
View Full Code Here

      if (!currentState.isJustCreated())
      {
         throw new IllegalStateException("setClientID can only be called directly after the connection is created");
      }
     
      MethodInvocation mi = (MethodInvocation)invocation;
     
      currentState.setClientID((String)mi.getArguments()[0]);
     
      currentState.setJustCreated(false);
     
      // this gets invoked on the server too
      return invocation.invokeNext();
View Full Code Here

   public Object handleSetExceptionListener(Invocation invocation) throws Throwable
   {
      ConnectionState state = getConnectionState(invocation);
      state.setJustCreated(false);
     
      MethodInvocation mi = (MethodInvocation)invocation;
      ExceptionListener exceptionListener = (ExceptionListener)mi.getArguments()[0];
      state.getRemotingConnection().getConnectionListener().
         addJMSExceptionListener(exceptionListener);

      return null;
   }
View Full Code Here

   public Object  handleRegisterFailoverListener(Invocation invocation) throws Throwable
   {
      ConnectionState state = getConnectionState(invocation);

      MethodInvocation mi = (MethodInvocation)invocation;
      FailoverListener listener = (FailoverListener)mi.getArguments()[0];

      state.getFailoverCommandCenter().registerFailoverListener(listener);

      return null;
   }
View Full Code Here

   public Object handleUnregisterFailoverListener(Invocation invocation) throws Throwable
   {
      ConnectionState state = getConnectionState(invocation);

      MethodInvocation mi = (MethodInvocation)invocation;
      FailoverListener listener = (FailoverListener)mi.getArguments()[0];

      boolean result = state.getFailoverCommandCenter().unregisterFailoverListener(listener);

      return new Boolean(result);
   }
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.