Package com.sun.cli.jmx.support

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


                String id = ruleType.getId();
                ActiveRule activeRule = rules.get(id);
                if (activeRule == null) {
                    LOGGER.warn("Cannot resolve activeRule for id '{}'.", id);
                } else {
                    ResultType result = ruleType.getResult();
                    boolean hasRows = result != null && result.getRows().getCount() > 0;
                    if (ruleType instanceof ConceptType && createEmptyConceptIssue && !hasRows) {
                        createIssue(project, null, "The concept did not return a result.", activeRule, sensorContext);
                    } else if (ruleType instanceof ConstraintType && hasRows) {
                        for (RowType rowType : result.getRows().getRow()) {
                            StringBuilder message = new StringBuilder();
                            Resource<?> resource = null;
                            Integer lineNumber = null;
                            for (ColumnType column : rowType.getColumn()) {
                                String name = column.getName();
View Full Code Here


    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

    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

 
    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

        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

    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

 
    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

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

    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

    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

Related Classes of com.sun.cli.jmx.support.InvokeResult$ResultType

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.