Examples of intercept()


Examples of Framework.anchored.ServiceProxy.intercept()

              }
            }
            else if (invokerObject instanceof ServiceProxy) {
              ServiceProxy invoker = (ServiceProxy)invokerObject;
              FrameworkUtils.setAppContext(TXN_ID, transactionData.distributedTransactionID);
              invoker.intercept(action, (Object[])null);
              FrameworkUtils.setAppContext(TXN_ID, null);
            }
          }
        }
    }
View Full Code Here

Examples of Framework.anchored.ServiceProxy.intercept()

              }
                else if (invokerObject instanceof ServiceProxy) {
                  ServiceProxy invoker = (ServiceProxy)invokerObject;
                  FrameworkUtils.setAppContext(TXN_ID, rootData.distributedTransactionID);
                  try {
                    invoker.intercept(ABORT_TXN, (Object[])null);
                  }
                catch (Exception e) {
                  _log.error("Aborting distributed transaction failed", e);
                }
                  FrameworkUtils.setAppContext(TXN_ID, null);
View Full Code Here

Examples of Framework.anchored.ServiceProxy.intercept()

              }
            }
            else if (invokerObject instanceof ServiceProxy) {
              ServiceProxy invoker = (ServiceProxy)invokerObject;
              FrameworkUtils.setAppContext(TXN_ID, transactionData.distributedTransactionID);
              invoker.intercept(action, (Object[])null);
              FrameworkUtils.setAppContext(TXN_ID, null);
            }
          }
        }
    }
View Full Code Here

Examples of Framework.anchored.ServiceProxy.intercept()

              }
                else if (invokerObject instanceof ServiceProxy) {
                  ServiceProxy invoker = (ServiceProxy)invokerObject;
                  FrameworkUtils.setAppContext(TXN_ID, rootData.distributedTransactionID);
                  try {
                    invoker.intercept(ABORT_TXN, (Object[])null);
                  }
                catch (Exception e) {
                  _log.error("Aborting distributed transaction failed", e);
                }
                  FrameworkUtils.setAppContext(TXN_ID, null);
View Full Code Here

Examples of br.com.caelum.vraptor.interceptor.Interceptor.intercept()

      if (interceptor == null) {
        throw new InterceptionException("Unable to instantiate interceptor for " + type.getName()
            + ": the container returned null.");
      }
      logger.debug("Invoking interceptor {}", interceptor.getClass().getSimpleName());
      interceptor.intercept(stack, method, resourceInstance);
    } else {
      stack.next(method, resourceInstance);
    }

  }
View Full Code Here

Examples of br.com.caelum.vraptor.interceptor.Interceptor.intercept()

      throw new InterceptionException("Unable to instantiate interceptor for " + type.getName()
          + ": the container returned null.");
    }
    if (interceptor.accepts(method)) {
      logger.debug("Invoking interceptor {}", interceptor.getClass().getSimpleName());
      interceptor.intercept(stack, method, resourceInstance);
    } else {
      stack.next(method, resourceInstance);
    }
  }
View Full Code Here

Examples of com.elibom.jogger.middleware.router.interceptor.Interceptor.intercept()

      // retrieve the interceptor and increase the index
      Interceptor interceptor = interceptors.get(index);
      index++;

      // execute the interceptor - notice that the interceptor can eventually call the proceed() method recursively.
      interceptor.intercept(request, response, this);
    }

    @Override
    public Controller getController() {
      // create and return a new instance of the Controller class
View Full Code Here

Examples of com.google.api.client.googleapis.auth.oauth2.GoogleCredential.intercept()

    HttpRequest request = transport.createRequestFactory().buildRequest("get", null, null);

    assertTrue(wrapper.createScopedRequired());
    try {
      wrapper.intercept(request);
      fail("Should not be able to use credential without scopes.");
    } catch (Exception expected) {
    }
    assertEquals(appIdentity.getGetAccessTokenCallCount(), 1);
View Full Code Here

Examples of com.google.api.client.googleapis.auth.oauth2.GoogleCredential.intercept()

    }
    assertEquals(appIdentity.getGetAccessTokenCallCount(), 1);

    GoogleCredential scopedWrapper = wrapper.createScoped(SCOPES);
    assertNotSame(wrapper, scopedWrapper);
    scopedWrapper.intercept(request);

    assertEquals(appIdentity.getGetAccessTokenCallCount(), 2);
    HttpHeaders headers = request.getHeaders();
    String authHeader = headers.getAuthorization();
    assertTrue(authHeader.contains(expectedAccessToken));
View Full Code Here

Examples of com.google.api.client.http.HttpExecuteInterceptor.intercept()

            }
            final HttpExecuteInterceptor interceptor = request.getInterceptor();
            request.setInterceptor(new HttpExecuteInterceptor() {
              public void intercept(HttpRequest request) throws IOException {
                if (interceptor != null) {
                  interceptor.intercept(request);
                }
                if (clientAuthentication != null) {
                  clientAuthentication.intercept(request);
                }
              }
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.