Package com.sun.enterprise.admin.remote

Examples of com.sun.enterprise.admin.remote.ParamsWithPayload


        ResponseBuilder rb = Response.status(status);
        if (xIndentHeader != null) {
            rb.header("X-Indent", xIndentHeader);
        }
        if (supportsMultiparResult && outbound.size() > 0) {
            ParamsWithPayload pwp = new ParamsWithPayload(outbound, ar);
            rb.entity(pwp);
        } else {
            rb.type(MediaType.APPLICATION_JSON_TYPE);
            rb.entity(ar);
        }
View Full Code Here


        ResponseBuilder rb = Response.status(status);
        if (xIndentHeader != null) {
            rb.header("X-Indent", xIndentHeader);
        }
        if (supportsMultiparResult && outbound.size() > 0) {
            ParamsWithPayload pwp = new ParamsWithPayload(outbound, ar);
            rb.entity(pwp);
        } else {
            rb.type(MediaType.APPLICATION_JSON_TYPE);
            rb.entity(ar);
        }
View Full Code Here

                    payload.add(name, mimePart.read(), ct, mimePart.getAllHeaders());
                }
            }
        }
        //Result
        return new ParamsWithPayload(payload, parameters, actionReport);
    }
View Full Code Here

        return readFrom(urlConnection.getInputStream(), urlConnection.getContentType());
    }

    @Override
    public ParamsWithPayload readFrom(final InputStream is, final String contentType) throws IOException {
        return new ParamsWithPayload(null, delegate.readFrom(is, contentType));
    }
View Full Code Here

    public boolean isWriteable(Object entity) {
        if (entity instanceof ParameterMap) {
            return true;
        }
        if (entity instanceof ParamsWithPayload) {
            ParamsWithPayload pwp = (ParamsWithPayload) entity;
            return pwp.getPayloadOutbound() == null || pwp.getPayloadOutbound().size() == 0;
        }
        return false;
    }
View Full Code Here

    protected static final String BOUNDERY_DELIMIT = "--";
   
    @Override
    public boolean isWriteable(final Object entity) {
        if (entity instanceof ParamsWithPayload) {
            ParamsWithPayload pwp = (ParamsWithPayload) entity;
            return pwp.getPayloadOutbound() != null && pwp.getPayloadOutbound().size() > 0;
        } else if (entity instanceof Payload.Outbound) {
            return ((Payload.Outbound) entity).size() > 0;
        }
        return false;
    }
View Full Code Here

                        final HttpURLConnection urlConnection) throws IOException {
        Payload.Outbound payload = null;
        ParameterMap parameters = null;
        ActionReport ar = null;
        if (entity instanceof ParamsWithPayload) {
            ParamsWithPayload pwp = (ParamsWithPayload) entity;
            payload = pwp.getPayloadOutbound();
            parameters = pwp.getParameters();
            ar = pwp.getActionReport();
        } else if (entity instanceof Payload.Outbound) {
            payload = (Payload.Outbound) entity;
        }
        writeTo(payload, parameters, ar,
                new OutputStream() {
View Full Code Here

TOP

Related Classes of com.sun.enterprise.admin.remote.ParamsWithPayload

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.