Examples of invoke()


Examples of org.springframework.boot.actuate.endpoint.InfoEndpoint.invoke()

    EnvironmentTestUtils.addEnvironment(this.context, "info.foo:bar");
    this.context.register(EndpointAutoConfiguration.class);
    this.context.refresh();
    InfoEndpoint endpoint = this.context.getBean(InfoEndpoint.class);
    assertNotNull(endpoint);
    assertNotNull(endpoint.invoke().get("git"));
    assertEquals("bar", endpoint.invoke().get("foo"));
  }

  @Test
  public void testNoGitProperties() throws Exception {
View Full Code Here

Examples of org.springframework.boot.actuate.endpoint.MetricsEndpoint.invoke()

  @Test
  public void metricEndpointsHasSystemMetricsByDefault() {
    load(PublicMetricsAutoConfiguration.class, EndpointAutoConfiguration.class);
    MetricsEndpoint endpoint = this.context.getBean(MetricsEndpoint.class);
    Map<String, Object> metrics = endpoint.invoke();
    assertTrue(metrics.containsKey("mem"));
    assertTrue(metrics.containsKey("heap.used"));
  }

  @Test
View Full Code Here

Examples of org.springframework.data.jpa.repository.support.CrudMethodMetadataPostProcessor.CrudMethodMetadataPopulatingMethodIntercceptor.invoke()

    Method method = Sample.class.getMethod("someMethod");
    when(invocation.getMethod()).thenReturn(method);

    CrudMethodMetadataPopulatingMethodIntercceptor interceptor = CrudMethodMetadataPopulatingMethodIntercceptor.INSTANCE;
    interceptor.invoke(invocation);

    assertThat(TransactionSynchronizationManager.getResource(method), is(nullValue()));
  }

  interface Sample {
View Full Code Here

Examples of org.springframework.data.repository.query.spi.Function.invoke()

      }

      Function function = (Function) value;

      try {
        return new TypedValue(function.invoke(new Object[0]));
      } catch (Exception e) {
        throw new SpelEvaluationException(e, SpelMessage.FUNCTION_REFERENCE_CANNOT_BE_INVOKED, name,
            function.getDeclaringClass());
      }
    }
View Full Code Here

Examples of org.springframework.messaging.handler.invocation.InvocableHandlerMethod.invoke()

    instance.afterPropertiesSet();

    InvocableHandlerMethod invocableHandlerMethod =
        createInvocableHandlerMethod(instance, "simpleString", String.class);

    invocableHandlerMethod.invoke(MessageBuilder.withPayload(sample).build());
    assertMethodInvocation(sample, "simpleString");
  }

  @Test
  public void customConversionServiceFailure() throws Exception {
View Full Code Here

Examples of org.springframework.remoting.support.DefaultRemoteInvocationExecutor.invoke()

                    XStream xstream = new XStream(new DomDriver());
                    SourceTransformer st = new SourceTransformer();
                    Object rmi = xstream.fromXML(st.toString(in.getContent()));

                    DefaultRemoteInvocationExecutor executor = new DefaultRemoteInvocationExecutor();
                    Object result = executor.invoke((RemoteInvocation) rmi, person);

                    // Convert result to an rmi invocation
                    RemoteInvocationResult rmiResult = new RemoteInvocationResult(result);
                    out.setContent(new StringSource(xstream.toXML(rmiResult)));
                } catch (Exception e) {
View Full Code Here

Examples of org.springframework.util.MethodInvoker.invoke()

    MethodInvoker methodInvoker = new MethodInvoker();
    methodInvoker.setTargetClass(MethodInvokerTests.TestClass1.class);
    methodInvoker.setTargetMethod("nullArgument");
    methodInvoker.setArguments(new Object[] {null});
    methodInvoker.prepare();
    methodInvoker.invoke();
  }

  public void testInvokeWithIntArgument() throws Exception {
    ArgumentConvertingMethodInvoker methodInvoker = new ArgumentConvertingMethodInvoker();
    methodInvoker.setTargetClass(MethodInvokerTests.TestClass1.class);
View Full Code Here

Examples of org.springframework.ws.server.endpoint.PayloadEndpoint.invoke()

    @Override
    public void invoke(MessageContext messageContext, Object endpoint) throws Exception {
        PayloadEndpoint payloadEndpoint = (PayloadEndpoint) endpoint;
        Source requestSource = messageContext.getRequest().getPayloadSource();
        Source responseSource = payloadEndpoint.invoke(requestSource);
        if (responseSource != null) {
            WebServiceMessage response = messageContext.getResponse();
            transform(responseSource, response.getPayloadResult());
        }
    }
View Full Code Here

Examples of org.stjs.generator.writer.inlineFunctions.FunctionInterface.$invoke()

    FunctionInterface f = new FunctionInterface() {
      @Override
      public void $invoke(int arg) {
      }
    };
    f.$invoke(4);
  }
}
View Full Code Here

Examples of org.switchyard.component.bean.ReferenceInvocation.invoke()

    @Override
    public void messageTest(String msg) {
        try {
            ReferenceInvocation invoker = invokerA.newInvocation("inOut");
            invoker.getMessage().setContent("message-test-in");
            invoker.invoke();
           
            // check that the correct message reference is returned from invoke
            Assert.assertNotNull(invoker.getMessage().getContent());
            Assert.assertEquals("message-test-out", invoker.getMessage().getContent());
        } catch (Exception ex) {
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.