Package org.glassfish.grizzly.http.util

Examples of org.glassfish.grizzly.http.util.HttpStatus


    public void onMissingResource(Request req, Response res) {

        LogHelper.getDefaultLogger().log(Level.FINER, "Received something on {0}", req.getRequestURI());
        LogHelper.getDefaultLogger().log(Level.FINER, "QueryString = {0}", req.getQueryString());
       
        HttpStatus statusCode = HttpStatus.OK_200;

        String requestURI = req.getRequestURI();
    /*    if (requestURI.startsWith("/__asadmin/ADMINGUI")) {
            super.service(req, res);

View Full Code Here


        }

        // tyrusConnection == null

        // proxy
        final HttpStatus httpStatus = ((HttpResponsePacket) message.getHttpHeader()).getHttpStatus();

        if (httpStatus.getStatusCode() != 101) {
            if (proxy && !PROXY_CONNECTED.get(grizzlyConnection)) {
                if (httpStatus == HttpStatus.OK_200) {

                    PROXY_CONNECTED.set(grizzlyConnection, true);

                    // TYRUS-221: Proxy handshake is complete, we need to enable SSL layer for secure ("wss")
                    // connections now.
                    if (sslFilter != null) {
                        ((GrizzlyClientSocket.FilterWrapper) sslFilter).enable();
                    }

                    httpCodecFilter.resetResponseProcessing(grizzlyConnection);

                    final UpgradeRequest upgradeRequest = UPGRADE_REQUEST.get(grizzlyConnection);
                    ctx.write(getHttpContent(upgradeRequest));
                    UPGRADE_REQUEST.remove(grizzlyConnection);
                } else {
                    throw new IOException(String.format("Proxy error. %s: %s", httpStatus.getStatusCode(),
                            new String(httpStatus.getReasonPhraseBytes(), "UTF-8")));
                }

                return ctx.getInvokeAction();
            }
        }
View Full Code Here

    public void onMissingResource(Request req, Response res) {

        LogHelper.getDefaultLogger().log(Level.FINER, "Received something on {0}", req.getRequestURI());
        LogHelper.getDefaultLogger().log(Level.FINER, "QueryString = {0}", req.getQueryString());
       
        HttpStatus statusCode = HttpStatus.OK_200;

        String requestURI = req.getRequestURI();
    /*    if (requestURI.startsWith("/__asadmin/ADMINGUI")) {
            super.service(req, res);

View Full Code Here

    public void onMissingResource(Request req, Response res) {

        LogHelper.getDefaultLogger().log(Level.FINER, "Received something on {0}", req.getRequestURI());
        LogHelper.getDefaultLogger().log(Level.FINER, "QueryString = {0}", req.getQueryString());
       
        HttpStatus statusCode = HttpStatus.OK_200;

        String requestURI = req.getRequestURI();
    /*    if (requestURI.startsWith("/__asadmin/ADMINGUI")) {
            super.service(req, res);

View Full Code Here

        key.recycle();
        try {
            if (entry != null && entry != NULL_CACHE_ENTRY) {
                // determine if we need to send the cache entry bytes
                // to the user-agent
                final HttpStatus httpStatus = checkIfHeaders(entry, request);

                final boolean flushBody = (httpStatus == null);
                if (flushBody && entry.type == CacheType.TIMESTAMP) {
                    return null; // this will cause control to be passed to the static handler
                }
View Full Code Here

     *         status has been defined, or <tt>null</tt> otherwise
     */
    private HttpStatus checkIfHeaders(final FileCacheEntry entry,
            final HttpRequestPacket request) throws IOException {

        HttpStatus httpStatus = checkIfMatch(entry, request);
        if (httpStatus == null) {
            httpStatus = checkIfModifiedSince(entry, request);
            if (httpStatus == null) {
                httpStatus = checkIfNoneMatch(entry, request);
                if (httpStatus == null) {
View Full Code Here

       
        setStatus(status, message);
       
        String nonNullMsg = message;
        if (nonNullMsg == null) {
            final HttpStatus httpStatus = HttpStatus.getHttpStatus(status);
            if (httpStatus != null && httpStatus.getReasonPhrase() != null) {
                nonNullMsg = httpStatus.getReasonPhrase();
            } else {
                nonNullMsg = "Unknown Error";
            }
        }
       
View Full Code Here

    public void onMissingResource(Request req, Response res) {

        LogHelper.getDefaultLogger().log(Level.FINER, "Received something on {0}", req.getRequestURI());
        LogHelper.getDefaultLogger().log(Level.FINER, "QueryString = {0}", req.getQueryString());
       
        HttpStatus statusCode = HttpStatus.OK_200;

        String requestURI = req.getRequestURI();
    /*    if (requestURI.startsWith("/__asadmin/ADMINGUI")) {
            super.service(req, res);

View Full Code Here

    public void onMissingResource(Request req, Response res) {

        LogHelper.getDefaultLogger().log(Level.FINER, "Received something on {0}", req.getRequestURI());
        LogHelper.getDefaultLogger().log(Level.FINER, "QueryString = {0}", req.getQueryString());
       
        HttpStatus statusCode = HttpStatus.OK_200;

        String requestURI = req.getRequestURI();
    /*    if (requestURI.startsWith("/__asadmin/ADMINGUI")) {
            super.service(req, res);

View Full Code Here

        key.recycle();
        try {
            if (entry != null && entry != NULL_CACHE_ENTRY) {
                // determine if we need to send the cache entry bytes
                // to the user-agent
                final HttpStatus httpStatus = checkIfHeaders(entry, request);

                final boolean flushBody = (httpStatus == null);
                if (flushBody && entry.type == CacheType.TIMESTAMP) {
                    return null; // this will cause control to be passed to the static handler
                }
View Full Code Here

TOP

Related Classes of org.glassfish.grizzly.http.util.HttpStatus

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.