Package com.sun.grizzly.tcp

Examples of com.sun.grizzly.tcp.RequestInfo


        if( log.isLoggable(Level.FINEST) )
            log.finest( "Invoke " + req + " " + res + " " + req.requestURI().toString());
       
        res.setNote( epNote, ep );
        ep.setStatus( MsgContext.JK_STATUS_HEAD );
        RequestInfo rp = req.getRequestProcessor();
        rp.setStage(Constants.STAGE_SERVICE);
        try {
            adapter.service( req, res );
        } catch( Exception ex ) {
            log.log(Level.INFO, "Error servicing request " + req,ex);
        }
        if(ep.getStatus() != MsgContext.JK_STATUS_CLOSED) {
            res.finish();
        }

        req.recycle();
        req.updateCounters();
        res.recycle();
        ep.recycle();
        if( ep.getStatus() == MsgContext.JK_STATUS_ERROR ) {
            return ERROR;
        }
        ep.setStatus( MsgContext.JK_STATUS_NEW );
        rp.setStage(Constants.STAGE_KEEPALIVE);
        return OK;
    }
View Full Code Here


    private int decodeRequest( Msg msg, MsgContext ep, MessageBytes tmpMB )
        throws IOException    {
        // FORWARD_REQUEST handler
        Request req = checkRequest(ep);

        RequestInfo rp = req.getRequestProcessor();
        rp.setStage(Constants.STAGE_PARSE);
        MessageBytes tmpMB2 = (MessageBytes)req.getNote(WorkerEnv.SSL_CERT_NOTE);
        if(tmpMB2 != null) {
            tmpMB2.recycle();
        }
        req.setStartTime(System.currentTimeMillis());
       
        // Translate the HTTP method code to a String.
        byte methodCode = msg.getByte();
        if (methodCode != AjpConstants.SC_M_JK_STORED) {
            String mName=AjpConstants.methodTransArray[(int)methodCode - 1];
            req.method().setString(mName);
        }

        msg.getBytes(req.protocol());
        msg.getBytes(req.requestURI());

        msg.getBytes(req.remoteAddr());
        msg.getBytes(req.remoteHost());
        msg.getBytes(req.localName());
        req.setLocalPort(msg.getInt());

        boolean isSSL = msg.getByte() != 0;
        if( isSSL ) {
            // XXX req.setSecure( true );
            req.scheme().setString("https");
        }

        decodeHeaders( ep, msg, req, tmpMB );

        decodeAttributes( ep, msg, req, tmpMB );

        rp.setStage(Constants.STAGE_PREPARE);
        MessageBytes valueMB = req.getMimeHeaders().getValue("host");
        parseHost(valueMB, req);
        // set cookies on request now that we have all headers
        req.getCookies().setHeaders(req.getMimeHeaders());
View Full Code Here

    }

    public void registerRequest(Request req, MsgContext ep, int count) {
        if(this.domain != null) {
            try {
                RequestInfo rp=req.getRequestProcessor();
                rp.setGlobalProcessor(global);
                ObjectName roname = new ObjectName
                    (getDomain() + ":type=RequestProcessor,worker="+
                     getChannelName()+",name=JkRequest" +count);
                ep.setNote(JMXRequestNote, roname);
                       
View Full Code Here

    }

    public void registerRequest(Request req, MsgContext ep, int count) {
        if(this.domain != null) {
            try {
                RequestInfo rp=req.getRequestProcessor();
                rp.setGlobalProcessor(global);
                ObjectName roname = new ObjectName
                    (getDomain() + ":type=RequestProcessor,worker="+
                     getChannelName()+",name=JkRequest" +count);
                ep.setNote(JMXRequestNote, roname);
                       
View Full Code Here

    public void registerRequest(Request req, MsgContext ep, int count) {
  if(this.domain != null) {
      try {

    RequestInfo rp=req.getRequestProcessor();
    rp.setGlobalProcessor(global);
    ObjectName roname = new ObjectName
        (getDomain() + ":type=RequestProcessor,worker="+
         getChannelName()+",name=JkRequest" +count);
    ep.setNote(JMXRequestNote, roname);
                       
View Full Code Here

TOP

Related Classes of com.sun.grizzly.tcp.RequestInfo

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.