Examples of InvokeResult


Examples of com.bj58.spat.gaea.client.proxy.ServiceProxy.InvokeResult

        if (ann != null) {
            if (!ann.methodName().equals(AnnotationUtil.DEFAULT_VALUE)) {
                methodName = "$" + ann.methodName();
            }
        }
        InvokeResult result = proxy.invoke(returnPara, lookup, methodName, paras);

        if (result != null && result.getOutPara() != null) {
            for (int i = 0; i < outParas.size() && i < result.getOutPara().length; i++) {
                Object op = args[outParas.get(i)];
                if(op instanceof Out){
                    ((Out)op).setOutPara(result.getOutPara()[i]);
                }
            }
        }
        return result.getResult();
    }
View Full Code Here

Examples of com.sun.cli.jmx.support.InvokeResult

    final String  argString  = MakeArgList( strings );
   
    final String []  args  = new String [] { targetName.toString() };
   
    final InvokeResult []  results  = (InvokeResult [])test.mbeanInvoke( operationName, argString, args );
    final InvokeResult  result  = results[ 0 ];
   
    if ( result.getResultType() == InvokeResult.SUCCESS )
    {
      // p( "SUCCESS: " + operationName + "(" + SmartStringifier.toString( paramInfos ) + ")");
    }
    else
    {
      final String paramInfosString  = SmartStringifier.toString( paramInfos );
     
      p( "FAILURE: " + operationName + "(" + paramInfosString + ")" +
        " with " + argString );
      result.mThrowable.printStackTrace();
    }
   
    return( result.getResultType() );
  }
View Full Code Here

Examples of com.sun.cli.jmx.support.InvokeResult

    final String  operationName  = "testPropertiesOnly";
    final String  argString  = "foo=bar";
    final InvokeResult []  results  = (InvokeResult [])
      mProxy.mbeanInvoke( operationName, argString, SUPPORT_TESTEE_TARGET );
     
    final InvokeResult  result  = results[ 0 ];
   
    if ( result.getResultType() != InvokeResult.SUCCESS )
    {
      throw new TestFailedException( "invocation failed: " + operationName + "(" + argString + ")" );
    }
   
  }
View Full Code Here

Examples of com.sun.cli.jmx.support.InvokeResult

 
    private Object
  doTest( final String operationName, final String arg )
    throws Exception
  {
    final InvokeResult  invokeResult  = invokeSimpleTestee( operationName, arg );
   
    if ( invokeResult.getResultType() != InvokeResult.SUCCESS )
    {
      fail( "invocation failed for " + operationName + "(" + arg + ")" );
    }
   
    return( invokeResult.mResult );
View Full Code Here

Examples of com.sun.cli.jmx.support.InvokeResult

        new Number [] { new BigInteger( "0" ), new BigDecimal( "10.0" ) } );
   
    // now see that incompatible casts are rejected
    final String  input  = "(Number){(String)hello}";
   
    final InvokeResult  invokeResult  = invokeSimpleTestee( "testObjectArray", input );
    if ( invokeResult.getResultType() == InvokeResult.SUCCESS )
    {
      fail( "expected this construct to fail: " + input );
    }
  }
View Full Code Here

Examples of com.sun.cli.jmx.support.InvokeResult

    public void
  testNullIllegalForSimpleType( ) throws Exception
  {
    try
    {
      final InvokeResult  result  = invokeSimpleTestee( "test_int", "null" );
      if ( result.getResultType() == InvokeResult.SUCCESS )
      {
        fail( "expected failure trying to pass 'null' for an int" );
      }
    }
    catch( Exception e )
View Full Code Here

Examples of com.sun.cli.jmx.support.InvokeResult

 
    public void
  testCaseSensitivity()
    throws Exception
  {
    InvokeResult  result;
   
    result  = invokeSimpleTestee( "testcasesensitivity1", null );
    assertEquals( "testcasesensitivity1", result.mResult );
   
    result  = invokeSimpleTestee( "testCASESENSITIVITY1", null );
    assertEquals( "testCASESENSITIVITY1", result.mResult );
   
    result  = invokeSimpleTestee( "testCaseSensitivity1", null );
    assertEquals( "testCaseSensitivity1", result.mResult );
   
    try
    {
      result  = invokeSimpleTestee( "testcaseSensitivity1", null );
      if ( result.getResultType() == InvokeResult.SUCCESS )
      {
        fail( "expected ambiguous match to prevent execution of method: " + result.mResult );
      }
    }
    catch( Exception e )
View Full Code Here

Examples of com.sun.cli.jmx.support.InvokeResult

 
    public void
  testCaseInsensitivity()
    throws Exception
  {
    final InvokeResult  result  = invokeSimpleTestee( "testcasesensitivity2", null );
    assertEquals( "testCaseSensitivity2", result.mResult );
  }
View Full Code Here

Examples of com.sun.cli.jmx.support.InvokeResult

    public void
  testURL()
    throws Exception
  {
    final URL  input  = new URL( "http://www.sun.com?foo=bar&bar=foo" );
    final InvokeResult  result  = invokeSimpleTestee( "testURL", input.toString() );
    assertEquals( input, result.mResult );
  }
View Full Code Here

Examples of com.sun.cli.jmx.support.InvokeResult

    public void
  testURI()
    throws Exception
  {
    final URI  input  = new URI( "service:jmx:jmxmp://localhost:" );
    final InvokeResult  result  = invokeSimpleTestee( "testURI", input.toString() );
    assertEquals( input, result.mResult );
  }
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.