Package org.sf.bee.app.server.web

Examples of org.sf.bee.app.server.web.WebUri


        super.validate(request,
                new String[]{METHOD_GET});

        final String target = request.getRequestLine().getUri();
        final WebUri uri = new WebUri(target);
        final String password = uri.getQueryParamAsString(REQ_PARAM_PASSWORD);
        if (isValidPassword(password)) {
            final String path = uri.getFilePath();
            if (path.endsWith("/" + CMD_CLOSE)) {
                super.doEvent(new BeeEvent(this, BeeEvents.ON_CLOSE));
            } else if (path.endsWith("/" + CMD_RESTART)) {
                super.doEvent(new BeeEvent(this, BeeEvents.ON_RESTART));
            }
View Full Code Here


        if (!method.equals("GET")) {
            throw new MethodNotSupportedException(method + " method not supported");
        }

        final String target = request.getRequestLine().getUri();
        final WebUri uri = new WebUri(target);
        final String password = uri.getQueryParamAsString(REQ_PARAM_PASSWORD);
        if (isValidPassword(password)) {
            final String path = uri.getFilePath();
            if (path.endsWith("/" + CMD_CLOSE)) {
                super.doEvent(new BeeEvent(this, BeeEvents.ON_CLOSE));
            } else if (path.endsWith("/" + CMD_RESTART)) {
                super.doEvent(new BeeEvent(this, BeeEvents.ON_RESTART));
            }
View Full Code Here

            throw new MethodNotSupportedException(method + " method not supported");
        }

        final WebContext webcontext = new WebContext(request, response, context);
        final String target = request.getRequestLine().getUri();
        final WebUri uri = new WebUri(target);
        final String path = uri.getFilePath(); // "rest/service/method"
        final Map<String, String> query = uri.getQueryParamsAsStringMap();
        //-- parse path --//
        final String[] pathtokens = CollectionUtils.delimitedListToStringArray(path, "/");
        if (pathtokens.length > 2) {
            final String serviceName = pathtokens[pathtokens.length - 2];
            final String methodName = pathtokens[pathtokens.length - 1];
View Full Code Here

    // ------------------------------------------------------------------------
    //                      p r i v a t e
    // ------------------------------------------------------------------------
    private void parse(final String text) {
        final WebUri uri = new WebUri(text);
        final String path = uri.getFilePath(); // "rest/service/method"
        _parameters = uri.getQueryParamsAsStringMap();
        //-- parse path --//
        final String[] pathtokens = CollectionUtils.delimitedListToStringArray(path, "/");
        if (pathtokens.length > 2) {
            _serviceName = pathtokens[pathtokens.length - 2];
            _methodName = pathtokens[pathtokens.length - 1];
View Full Code Here

    public WebRequest(final HttpRequest request,
            final HttpInetConnection connection) {
        _request = request;
        _connection = connection;
        if (null != request) {
            _uri = new WebUri(request.getRequestLine().getUri());
            _rawHeaders = request.getAllHeaders();
        }
    }
View Full Code Here

TOP

Related Classes of org.sf.bee.app.server.web.WebUri

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.