Examples of RequestContext


Examples of org.apache.abdera.protocol.server.RequestContext

  implements Resolver<Subject> {

  public static final Principal ANONYMOUS = new AnonymousPrincipal();
 
  public Subject resolve(Request request) {
    RequestContext context = (RequestContext) request;
    return resolve(context.getPrincipal());
  }
View Full Code Here

Examples of org.apache.abdera.protocol.server.provider.RequestContext

    HttpServletResponse response)
      throws IOException {
   
    ProviderManager manager = context.getProviderManager();
    Provider provider = manager.getProvider();
    RequestContext requestContext = getRequestContext(context,request);
   
    try {
      if (preconditions(provider, requestContext, response)) {
        output(response,process(provider, requestContext));
      }
View Full Code Here

Examples of org.apache.abdera.server.RequestContext

  @Override
  protected void service(
    HttpServletRequest request,
    HttpServletResponse response)
      throws ServletException, IOException {
    RequestContext requestContext = new ServletRequestContext(request);
    ResponseContext responseContext = null;
    RequestHandler handler = null;
    try {
      RequestHandlerFactory factory = RequestHandlerFactory.INSTANCE;            // TODO: improve this
      if (factory != null)
View Full Code Here

Examples of org.apache.airavata.common.context.RequestContext

        return gatewayId;
    }

    public void addToContext(String userName, String gatewayId) {

        RequestContext requestContext = new RequestContext();
        requestContext.setUserIdentity(userName);
        requestContext.setGatewayId(gatewayId);

        WorkflowContext.set(requestContext);
    }
View Full Code Here

Examples of org.apache.beehive.netui.pageflow.RequestContext

           
            try
            {
                ServletContext servletContext = ( ServletContext ) extContext;
                FlowControllerFactory fcFactory = FlowControllerFactory.get( servletContext );
                PageFlowController pfc = fcFactory.getPageFlowForRequest( new RequestContext( httpRequest, httpResponse ) );
                PageFlowUtils.getCurrentPageFlow( httpRequest );
   
                if ( pfc != null )
                {
                    if ( outcome != null )
View Full Code Here

Examples of org.apache.commons.fileupload.RequestContext

    @SuppressWarnings("unchecked")
    public static Map<String, byte[]> parseMultipart(final RequestHeader header, final serverObjects args, final InputStream in) throws IOException {

        final InputStream body = prepareBody(header, in);
       
        RequestContext request = new yacyContextRequest(header, body);

        // check information
        if (!FileUploadBase.isMultipartContent(request)) {
            throw new IOException("the request is not a multipart-message!");
        }
       
        // check if we have enough memory
        if (!MemoryControl.request(request.getContentLength() * 3, false)) {
          throw new IOException("not enough memory available for request. request.getContentLength() = " + request.getContentLength() + ", MemoryControl.available() = " + MemoryControl.available());
        }

        // parse data in memory
        final FileUpload upload = new FileUpload(DISK_FILE_ITEM_FACTORY);
        final List<FileItem> items;
View Full Code Here

Examples of org.apache.hadoop.hbase.ipc.RequestContext

  }

  private void logResult(AuthResult result) {
    if (AUDITLOG.isTraceEnabled()) {
      InetAddress remoteAddr = null;
      RequestContext ctx = RequestContext.get();
      if (ctx != null) {
        remoteAddr = ctx.getRemoteAddress();
      }
      AUDITLOG.trace("Access " + (result.isAllowed() ? "allowed" : "denied") +
          " for user " + (result.getUser() != null ? result.getUser().getShortName() : "UNKNOWN") +
          "; reason: " + result.getReason() +
          "; remote address: " + (remoteAddr != null ? remoteAddr : "") +
View Full Code Here

Examples of org.apache.hadoop.thriftfs.api.RequestContext

    return conf;
  }

  public static RequestContext createRequestContext(boolean superuser) throws IOException {
    RequestContext ctx = new RequestContext();
    Configuration conf = new Configuration();

    UserGroupInformation ugi;
    if (superuser) {
      ugi = UserGroupInformation.getCurrentUser();
View Full Code Here

Examples of org.apache.hadoop.yarn.webapp.Controller.RequestContext

    appId.setId(5);
    when(ctx.getApplicationID()).thenReturn(appId);

    AppForTest app = new AppForTest(ctx);
    Configuration config = new Configuration();
    RequestContext requestCtx = mock(RequestContext.class);
    HsControllerForTest controller = new HsControllerForTest(app, config,
            requestCtx);
    controller.index();
    assertEquals("JobHistory", controller.get(Params.TITLE, ""));
    assertEquals(HsJobPage.class, controller.jobPage());
View Full Code Here

Examples of org.apache.isis.viewer.scimpi.dispatcher.context.RequestContext

            } else if (type.equals("object-graph")) {
                objectGraph(request);

            } else if (type.equals("object")) {
                final String value = request.getOptionalProperty(VALUE);
                final RequestContext context = request.getContext();
                final ObjectAdapter object = context.getMappedObject(value);
                final DebugString str = new DebugString();
                Dump.adapter(object, str);
                Dump.graph(object, IsisContext.getAuthenticationSession(), str);
                request.appendHtml("<h2>" + object.getSpecification().getFullIdentifier() + "</h2>");
                request.appendHtml("<pre class=\"debug\">" + str + "</pre>");
            }

        }

        if (alwaysShow || request.getContext().getDebug() == RequestContext.Debug.ON) {

            final RequestContext context = request.getContext();

            final String id = request.getOptionalProperty("object");
            if (id != null) {
                final ObjectAdapter object = context.getMappedObject(id);
                if (object instanceof DebuggableWithTitle) {
                    final DebugString debug = new DebugString();
                    ((DebuggableWithTitle) object).debugData(debug);
                    request.appendHtml("<pre class=\"debug\">" + debug + "</pre>");
                } else {
                    request.appendHtml(object.toString());
                }
            }

            final String variable = request.getOptionalProperty("variable");
            if (variable != null) {
                final Object object = context.getVariable(variable);
                request.appendHtml(variable + " => " + (object == null ? "null" : object.toString()));
            }

            final String list = request.getOptionalProperty("list");
            if (list != null) {
                final DebugString debug = new DebugString();
                context.append(debug, list);
                request.appendHtml(debug.toString());
            }

            final String uri = request.getOptionalProperty("uri");
            if (uri != null) {
                request.appendHtml("<pre class=\"debug\">");
                request.appendHtml(context.getUri());
                request.appendHtml("</pre>");
            }

        }
    }
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.