Package ch.softappeal.yass.core

Examples of ch.softappeal.yass.core.Invocation


      methodMapper = methodMapper(service.contractId.contract);
      implementation = service.implementation;
    }

    Reply invoke(final Interceptor invocationInterceptor, final Method method, @Nullable final Object[] arguments) {
      final Invocation invocation = new Invocation() {
        @Override public Object proceed() throws Throwable {
          try {
            return method.invoke(implementation, arguments);
          } catch (final InvocationTargetException e) {
            throw e.getCause();
View Full Code Here


    /**
     * @param interceptor prepended to the interceptor chain
     * @see Client#invoke(ClientInvocation)
     */
    @Nullable public Object invoke(final Interceptor interceptor, final Tunnel tunnel) throws Throwable {
      return Interceptors.composite(interceptor, invocationInterceptor).invoke(methodMapping.method, arguments, new Invocation() {
        @Override public Object proceed() throws Throwable {
          final Reply reply = tunnel.invoke(new Request(serviceId, methodMapping.id, arguments));
          return oneWay ? null : reply.process();
        }
      });
View Full Code Here

      implementation = service.implementation;
      serviceInterceptor = service.interceptor;
    }

    Reply invoke(final Interceptor invokerInterceptor, final Request request, final Method method) {
      final Invocation invocation = new Invocation(method, request.arguments) {
        @Override public Object proceed() throws Throwable {
          try {
            return method.invoke(implementation, arguments);
          } catch (final InvocationTargetException e) {
            //noinspection ThrowInsideCatchBlockWhichIgnoresCaughtException
View Full Code Here

    /**
     * @param interceptor prepended to the interceptor chain
     * @see Client#invoke(ClientInvocation)
     */
    @Nullable public Object invoke(final Interceptor interceptor, final Tunnel tunnel) throws Throwable {
      return Interceptors.composite(interceptor, invocationInterceptor).invoke(new Invocation(methodMapping.method, arguments) {
        @Override public Object proceed() throws Throwable {
          final Reply reply = tunnel.invoke(new Request(context, serviceId, methodMapping.id, arguments));
          if (oneWay) {
            context = null;
            return null;
View Full Code Here

    /**
     * @param interceptor prepended to the interceptor chain
     * @see Client#invoke(ClientInvocation)
     */
    @Nullable public Object invoke(final Interceptor interceptor, final Tunnel tunnel) throws Throwable {
      return Interceptors.composite(interceptor, invocationInterceptor).invoke(methodMapping.method, arguments, new Invocation() {
        @Override public Object proceed() throws Throwable {
          final Reply reply = tunnel.invoke(new Request(serviceId, methodMapping.id, arguments));
          return oneWay ? null : reply.process();
        }
      });
View Full Code Here

      methodMapper = methodMapper(service.contractId.contract);
      implementation = service.implementation;
    }

    Reply invoke(final Interceptor invocationInterceptor, final Method method, @Nullable final Object[] arguments) {
      final Invocation invocation = new Invocation() {
        @Override public Object proceed() throws Throwable {
          try {
            return method.invoke(implementation, arguments);
          } catch (final InvocationTargetException e) {
            throw e.getCause();
View Full Code Here

    /**
     * @param interceptor prepended to the interceptor chain
     * @see Client#invoke(ClientInvocation)
     */
    @Nullable public Object invoke(final Interceptor interceptor, final Tunnel tunnel) throws Throwable {
      return Interceptors.composite(interceptor, invocationInterceptor).invoke(methodMapping.method, arguments, new Invocation() {
        @Override public Object proceed() throws Throwable {
          final Reply reply = tunnel.invoke(new Request(serviceId, methodMapping.id, arguments));
          return oneWay ? null : reply.process();
        }
      });
View Full Code Here

      methodMapper = methodMapper(service.contractId.contract);
      implementation = service.implementation;
    }

    Reply invoke(final Interceptor invocationInterceptor, final Method method, @Nullable final Object[] arguments) {
      final Invocation invocation = new Invocation() {
        @Override public Object proceed() throws Throwable {
          try {
            return method.invoke(implementation, arguments);
          } catch (final InvocationTargetException e) {
            throw e.getCause();
View Full Code Here

    /**
     * @param interceptor prepended to the interceptor chain
     * @see Client#invoke(ClientInvocation)
     */
    @Nullable public Object invoke(final Interceptor interceptor, final Tunnel tunnel) throws Throwable {
      return Interceptors.composite(interceptor, invocationInterceptor).invoke(methodMapping.method, arguments, new Invocation() {
        @Override public Object proceed() throws Throwable {
          final Reply reply = tunnel.invoke(new Request(serviceId, methodMapping.id, arguments));
          return oneWay ? null : reply.process();
        }
      });
View Full Code Here

    /**
     * @param interceptor prepended to the interceptor chain
     * @see Client#invoke(ClientInvocation)
     */
    @Nullable public Object invoke(final Interceptor interceptor, final Tunnel tunnel) throws Throwable {
      return Interceptors.composite(interceptor, invocationInterceptor).invoke(new Invocation(mapping.method, arguments) {
        @Override public Object proceed() throws Throwable {
          final Reply reply = tunnel.invoke(new Request(context, serviceId, mapping.methodId, arguments));
          if (oneWay) {
            context = null;
            return null;
View Full Code Here

TOP

Related Classes of ch.softappeal.yass.core.Invocation

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.