Examples of RESTfulCommand


Examples of org.sf.bee.commons.remoting.rest.repository.RESTfulCommand

    }

    @Override
    public ConsumingNHttpEntity entityRequest(HttpEntityEnclosingRequest request,
            HttpContext context) throws HttpException, IOException {
        final RESTfulCommand command = new RESTfulCommand(
                request.getRequestLine().getUri());
        final ByteBufferAllocator allocator;
        if (command.getMethodName().equalsIgnoreCase(REQ_CMD_UPLOAD)) {
            // file upload
            allocator = new BeeByteBufferAllocator();
            // should write header for content type or other parameter to pass to threaded handler
            request.addHeader(REQ_TEMPFILE,
                    ((BeeByteBufferAllocator) allocator).getTempfilename());
View Full Code Here

Examples of org.sf.bee.commons.remoting.rest.repository.RESTfulCommand

            HttpContext context) throws HttpException, IOException {
        super.onLog(Level.FINE, "Handlig Class: " + this.getClass().getName());
        super.validate(request,
                new String[]{METHOD_GET, METHOD_POST});

        final RESTfulCommand command = new RESTfulCommand(
                request.getRequestLine().getUri());
        if (command.isValid()) {
            final WebContext webcontext = new WebContext(request, response,
                    context);
            // decode parameters
            HTMLUtils.URLDecodeAll(command.getParameters());
            try {
                if (request instanceof HttpEntityEnclosingRequest) {
                    // UPLOAD
                    this.handleHttpEntityEnclosingRequest(
                            (HttpEntityEnclosingRequest) request,
                            command.getServiceName(),
                            command.getMethodName(),
                            command.getParameters(),
                            webcontext, trigger);
                } else {
                    this.handleHttpRequest(
                            command.getServiceName(),
                            command.getMethodName(),
                            command.getParameters(),
                            webcontext, trigger);
                }
            } catch (Throwable t) {
                super.getLogger().log(Level.SEVERE, null, t);
            }
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.