Examples of invokeMethod()


Examples of org.apache.qpid.qmf2.console.QmfConsoleData.invokeMethod()

            try
            {
                QmfData arguments = new QmfData();
                arguments.setValue("request", (long)(_purge*msgDepth));
                queue.invokeMethod("purge", arguments);
            }
            catch (QmfException e)
            {
                System.out.println(e.getMessage());
            }   
View Full Code Here

Examples of org.apache.qpid.qmf2.console.QmfConsoleData.invokeMethod()

                                // Invoke the specified method on the QmfConsoleData we've created.
                                MethodResult results = null;

                                _log.info("invokeMethod: {}", request);
                                results = object.invokeMethod(method, inArgs);
                                tx.sendResponse(HTTP_OK, "application/json", JSON.fromObject(results));
                            }
                            catch (QmfException qmfe)
                            {
                                _log.info("QpidServer.doPost() caught Exception {}", qmfe.getMessage());
View Full Code Here

Examples of org.codehaus.gant.GantBuilder.invokeMethod()

    final File gantFile = newProject.resolveFile( file ) ;
    if ( ! gantFile.exists ( ) ) { throw new BuildException ( "Gantfile does not exist." , getLocation ( ) ) ; }
    final GantBuilder ant = new GantBuilder ( newProject ) ;
    final Map<String,String> environmentParameter = new HashMap<String,String> ( ) ;
    environmentParameter.put ( "environment" , "environment" ) ;
    ant.invokeMethod ( "property" , new Object[] { environmentParameter } ) ;
    final GantBinding binding = new GantBinding ( ) ;
    binding.forcedSettingOfVariable ( "ant" , ant ) ;
    for ( final Definition definition : definitions ) {
      final Map<String,String> definitionParameter = new HashMap<String,String> ( ) ;
      definitionParameter.put ( "name" , definition.getName ( ) ) ;
View Full Code Here

Examples of org.drools.spring.pojorule.RuleReflectMethod.invokeMethod()

        mocks.replay();

        RuleReflectMethod ruleMethod = new RuleReflectMethod(rule, pojo, pojoMethod,
                parameterValues);
        ruleMethod.invokeMethod(mockTuple);

        mocks.verify();
    }

    private static class SerializablePojo implements Serializable {
View Full Code Here

Examples of org.drools.spring.pojorule.RuleReflectMethod.invokeMethod()

                .getMethod("method", new Class[] { String.class });
        RuleReflectMethod ruleMethod = new RuleReflectMethod(rule, pojo, pojoMethod,
                parameterValues);

        RuleReflectMethod deserializedRuleMethod = (RuleReflectMethod) fromByteArray(toByteArray(ruleMethod));
        deserializedRuleMethod.invokeMethod(null);

        Field pojoField = deserializedRuleMethod.getClass().getDeclaredField("pojo");
        pojoField.setAccessible(true);
        SerializablePojo deserializedPojo = (SerializablePojo) pojoField
                .get(deserializedRuleMethod);
View Full Code Here

Examples of org.drools.spring.pojorule.RuleReflectMethod.invokeMethod()

    public void testPojoMethodThrowsException() throws Exception {
        MockControl controlRuleMethod = newMockRuleMethod();
        RuleReflectMethod mockRuleMethod = (RuleReflectMethod) controlRuleMethod.getMock();
        controlRuleMethod.expectAndReturn(mockRuleMethod.getArguments(), new Argument[] {});
        controlRuleMethod.expectAndThrow(mockRuleMethod.invokeMethod(null), new RuntimeException("test"));

        mocks.replay();

        PojoCondition pojoCondition = new PojoCondition(mockRuleMethod);
        try {
View Full Code Here

Examples of org.drools.spring.pojorule.RuleReflectMethod.invokeMethod()

        MockControl controlTuple = mocks.createControl(Tuple.class);
        Tuple mockTuple = (Tuple)controlTuple.getMock();
        MockControl controlRuleMethod = newMockRuleMethod();
        RuleReflectMethod mockRuleMethod = (RuleReflectMethod) controlRuleMethod.getMock();
        controlRuleMethod.expectAndReturn(mockRuleMethod.getArguments(), new Argument[] {});
        controlRuleMethod.expectAndReturn(mockRuleMethod.invokeMethod(mockTuple), Boolean.TRUE);

        mocks.replay();

        PojoCondition pojoCondition = new PojoCondition(mockRuleMethod);
        pojoCondition.isAllowed(mockTuple);
View Full Code Here

Examples of org.drools.spring.pojorule.RuleReflectMethod.invokeMethod()

    public void testPojoMethodThrowsException() throws Exception {
        MockControl controlTuple = mocks.createControl(Tuple.class);
        Tuple mockTuple = (Tuple)controlTuple.getMock();
        MockControl controlRuleMethod = newMockRuleMethod();
        RuleReflectMethod mockRuleMethod = (RuleReflectMethod) controlRuleMethod.getMock();
        controlRuleMethod.expectAndThrow(mockRuleMethod.invokeMethod(mockTuple),
                new RuntimeException("test-exception"));
        RuleReflectMethod[] mockRuleMethods = new RuleReflectMethod[]{mockRuleMethod};

        mocks.replay();
View Full Code Here

Examples of org.drools.spring.pojorule.RuleReflectMethod.invokeMethod()

    public void testInvoke() throws Exception {
        MockControl controlTuple = mocks.createControl(Tuple.class);
        Tuple mockTuple = (Tuple)controlTuple.getMock();
        MockControl controlRuleMethod = newMockRuleMethod();
        RuleReflectMethod mockRuleMethod = (RuleReflectMethod) controlRuleMethod.getMock();
        controlRuleMethod.expectAndReturn(mockRuleMethod.invokeMethod(mockTuple), null);
        RuleReflectMethod[] mockRuleMethods = new RuleReflectMethod[]{mockRuleMethod};

        mocks.replay();

        PojoConsequence pojoConsequence = new PojoConsequence(mockRuleMethods);
View Full Code Here

Examples of org.drools.spring.pojorule.RuleReflectMethod.invokeMethod()

    public void testInvokeMulti() throws Exception {
        MockControl controlTuple = mocks.createControl(Tuple.class);
        Tuple mockTuple = (Tuple)controlTuple.getMock();
        MockControl controlRuleMethod_1 = newMockRuleMethod();
        RuleReflectMethod mockRuleMethod_1 = (RuleReflectMethod) controlRuleMethod_1.getMock();
        controlRuleMethod_1.expectAndReturn(mockRuleMethod_1.invokeMethod(mockTuple), null);
        MockControl controlRuleMethod_2 = newMockRuleMethod();
        RuleReflectMethod mockRuleMethod_2 = (RuleReflectMethod) controlRuleMethod_2.getMock();
        controlRuleMethod_2.expectAndReturn(mockRuleMethod_2.invokeMethod(mockTuple), null);
        RuleReflectMethod[] mockRuleMethods = new RuleReflectMethod[]{mockRuleMethod_1, mockRuleMethod_2};
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.