Examples of Invocation


Examples of com.caucho.server.dispatch.Invocation

   */
  public void include(ServletRequest topRequest, ServletResponse topResponse,
                      String method)
    throws ServletException, IOException
  {
    Invocation invocation = _includeInvocation;

    HttpServletRequest parentReq;
    ServletRequestWrapper reqWrapper = null;

    if (topRequest instanceof ServletRequestWrapper) {
      ServletRequest request = topRequest;
     
      while (request instanceof ServletRequestWrapper) {
        reqWrapper = (ServletRequestWrapper) request;
       
        request = ((ServletRequestWrapper) request).getRequest();
      }

      parentReq = (HttpServletRequest) request;
    } else if (topRequest instanceof HttpServletRequest) {
      parentReq = (HttpServletRequest) topRequest;
    } else {
      throw new IllegalStateException(L.l(
        "expected instance of ServletRequestWrapper at `{0}'", topResponse));
    }

    HttpServletResponse parentRes;
    ServletResponseWrapper resWrapper = null;

    if (topResponse instanceof ServletResponseWrapper) {
      ServletResponse response = topResponse;
     
      while (response instanceof ServletResponseWrapper) {
        resWrapper = (ServletResponseWrapper) response;
       
        response = ((ServletResponseWrapper) response).getResponse();
      }

      parentRes = (HttpServletResponse) response;
    } else if (topResponse instanceof HttpServletResponse) {
      parentRes = (HttpServletResponse) topResponse;
    } else {
      throw new IllegalStateException(L.l(
        "expected instance of ServletResponse at '{0}'", topResponse));
    }

    IncludeRequest subRequest
      = new IncludeRequest(parentReq, parentRes, invocation);
   
    // server/10yf, jsp/15di
    if (subRequest.getRequestDepth(0) > MAX_DEPTH)
      throw new ServletException(L.l("too many servlet includes '{0}'", parentReq.getServletPath()));

    IncludeResponse subResponse = subRequest.getResponse();

    if (reqWrapper != null) {
      reqWrapper.setRequest(subRequest);
    }
    else {
      topRequest = subRequest;
    }

    if (resWrapper != null) {
      resWrapper.setResponse(subResponse);
    }
    else {
      topResponse = subResponse;
    }
   
    // jsp/15lf, jsp/17eg - XXX: integrated with ResponseStream?
    // res.flushBuffer();

    subRequest.startRequest();

    try {
      invocation.service(topRequest, topResponse);
    } finally {
      if (reqWrapper != null)
        reqWrapper.setRequest(parentReq);
     
      if (resWrapper != null)
View Full Code Here

Examples of com.sun.ejb.Invocation

        // Process application-specific method.

        Object returnValue = null;

        Invocation inv = new Invocation();
       
        inv.isLocal   = true;
        inv.isBusinessInterface = !isLocalHomeView();
        inv.isHome    = false;
        inv.ejbObject = this;
View Full Code Here

Examples of com.sun.xml.ws.xmlfilter.Invocation

     *
     * @param invocation
     * @return transformed invocations
     */
    public Collection<Invocation> transform(final Invocation invocation) {
        Invocation resultInvocation = invocation;
        switch (invocation.getMethodType()) {
            case WRITE_START_ELEMENT:
                if (!isProcessingWSTCPAssertion) {
                    isProcessingWSTCPAssertion = startBuffering(invocation);
                }
View Full Code Here

Examples of evolaris.framework.async.datamodel.Invocation

    SmsInteractionExecutionForm executionForm = (SmsInteractionExecutionForm)form;
   
    Long invocationId = executionForm.getId();
    SmsDbManager smsDbManager = new SmsDbManager(locale,session);
   
    Invocation invocation = smsDbManager.getInvocation(invocationId);
   
    if (invocation == null){
      throw new InputException(getResources(req).getMessage(locale, "sys.entryNotAvailable"),"id = " + executionForm.getId(),null,null);
    }
   
View Full Code Here

Examples of javax.microedition.content.Invocation

     if cancelled with {@link #cancelGetRequest cancelGetRequest}
     * @see javax.microedition.content.Registry#invoke
     * @see javax.microedition.content.ContentHandlerServer#finish
     */
    public Invocation getRequest(boolean wait) {
  Invocation request = new Invocation((InvocationImpl)null);
        InvocationImpl invoc = super.getRequest(wait, request);
        if (invoc != null) {
      // Wrap it in an Invocation instance
      request.setInvocImpl(invoc);
      return request;
        }
        return null;
    }
View Full Code Here

Examples of javax.ws.rs.client.Invocation

        builder.headers(newHeaders);


        builder.property(REQUEST_PROPERTY_FILTER_REUSED, "true");

        Invocation invocation;
        if (request.getEntity() == null) {
            invocation = builder.build(method);
        } else {
            invocation = builder.build(method,
                    Entity.entity(request.getEntity(), request.getMediaType()));
        }
        Response nextResponse = invocation.invoke();


        if (nextResponse.hasEntity()) {
            response.setEntityStream(nextResponse.readEntity(InputStream.class));
        }
View Full Code Here

Examples of jp.co.acroquest.endosnipe.javelin.bean.Invocation

        if (component == null)
        {
            return null;
        }

        Invocation invocation = component.getInvocation(methodName);
        return invocation;
    }
View Full Code Here

Examples of net.paoding.rose.web.Invocation

    }

    protected Object[] resolveMethodParameters(String methodName) throws Exception {
        String uri = "/methodparameter/methodParameter2/" + methodName;
        invoke(uri, "GET", "");
        Invocation inv = (Invocation) request.getAttribute("$$paoding-rose.invocation");
        return inv.getMethodParameters();

        //        Method method = findMethod(methodName);
        //        assertNotNull("not found method named: " + methodName, method);
        //        ParameterNameDiscovererImpl parameterNameDiscoverer = new ParameterNameDiscovererImpl();
        //        ResolverFactoryImpl resolverFactory = new ResolverFactoryImpl();
View Full Code Here

Examples of org.apache.cayenne.util.Invocation

        // result in a memory leak per CAY-770. This seemed to happen when lots of
        // invocations got registered, but no events were dispatched (hence the stale
        // invocation removal during dispatch did not happen)
        Iterator<Invocation> it = invocations.iterator();
        while (it.hasNext()) {
            Invocation i = it.next();
            if (i.getTarget() == null) {
                it.remove();
            }
        }

        invocations.add(invocation);
View Full Code Here

Examples of org.apache.cayenne.util.Invocation

                continue;
            }

            Iterator<Invocation> it = senderInvocations.iterator();
            while (it.hasNext()) {
                Invocation invocation = it.next();
                if (invocation.getTarget() == listener) {
                    it.remove();
                    didRemove = true;
                }
            }
        }
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.