Examples of TunnelService


Examples of org.restlet.service.TunnelService

     * @param request
     *            The request to update.
     * @return True if the query has been updated, false otherwise.
     */
    private boolean processExtensions(Request request) {
        final TunnelService tunnelService = getTunnelService();
        boolean extensionsModified = false;

        // Tunnel the client preferences only for GET or HEAD requests
        final Method method = request.getMethod();
        if (tunnelService.isPreferencesTunnel()
                && (method.equals(Method.GET) || method.equals(Method.HEAD))) {
            final Reference resourceRef = request.getResourceRef();

            if (resourceRef.hasExtensions()) {
                final ClientInfo clientInfo = request.getClientInfo();
View Full Code Here

Examples of org.restlet.service.TunnelService

     * @param request
     *            The request to update.
     */
    @SuppressWarnings("unchecked")
    private void processHeaders(Request request) {
        final TunnelService tunnelService = getTunnelService();

        if (tunnelService.isMethodTunnel()) {
            // get the headers
            final Series<Parameter> extraHeaders = (Series<Parameter>) request
                    .getAttributes().get(HeaderConstants.ATTRIBUTE_HEADERS);

            if (extraHeaders != null) {
View Full Code Here

Examples of org.restlet.service.TunnelService

     * @param request
     *            The request to update.
     * @return True if the query has been updated, false otherwise.
     */
    private boolean processQuery(Request request) {
        TunnelService tunnelService = getTunnelService();
        boolean queryModified = false;
        Reference resourceRef = request.getResourceRef();

        if (resourceRef.hasQuery()) {
            Form query = resourceRef.getQueryAsForm();

            // Tunnel the request method
            Method method = request.getMethod();
            if (tunnelService.isMethodTunnel()) {
                String methodName = query.getFirstValue(tunnelService
                        .getMethodParameter());

                Method tunnelledMethod = Method.valueOf(methodName);
                // The OPTIONS method can be tunneled via GET requests.
                if (tunnelledMethod != null
                        && (Method.POST.equals(method) || Method.OPTIONS
                                .equals(tunnelledMethod))) {
                    request.setMethod(tunnelledMethod);
                    query.removeFirst(tunnelService.getMethodParameter());
                    queryModified = true;
                }
            }

            // Tunnel the client preferences
            if (tunnelService.isPreferencesTunnel()) {
                // Get the parameter names to look for
                String charSetParameter = tunnelService
                        .getCharacterSetParameter();
                String encodingParameter = tunnelService.getEncodingParameter();
                String languageParameter = tunnelService.getLanguageParameter();
                String mediaTypeParameter = tunnelService
                        .getMediaTypeParameter();

                // Get the preferences from the query
                String acceptedCharSet = query.getFirstValue(charSetParameter);
                String acceptedEncoding = query
View Full Code Here

Examples of org.restlet.service.TunnelService

        this.outboundRoot = null;
        this.inboundRoot = null;
        this.roles = new CopyOnWriteArrayList<Role>();
        this.services = new ServiceList(context);
        this.services.add(new TunnelService(true, true));
        this.services.add(new StatusService());
        this.services.add(new DecoderService());
        this.services.add(new EncoderService(false));
        this.services.add(new RangeService());
        this.services.add(new ConnectorService());
View Full Code Here

Examples of org.restlet.service.TunnelService

     * @param request
     *            The request to update.
     * @return True if the query has been updated, false otherwise.
     */
    private boolean processExtensions(Request request) {
        final TunnelService tunnelService = getTunnelService();
        boolean extensionsModified = false;

        // Tunnel the client preferences only for GET or HEAD requests
        final Method method = request.getMethod();
        if (tunnelService.isPreferencesTunnel()
                && (method.equals(Method.GET) || method.equals(Method.HEAD))) {
            final Reference resourceRef = request.getResourceRef();

            if (resourceRef.hasExtensions()) {
                final ClientInfo clientInfo = request.getClientInfo();
View Full Code Here

Examples of org.restlet.service.TunnelService

     * @param request
     *            The request to update.
     * @return True if the query has been updated, false otherwise.
     */
    private boolean processQuery(Request request) {
        final TunnelService tunnelService = getTunnelService();
        boolean queryModified = false;
        final Reference resourceRef = request.getResourceRef();

        if (resourceRef.hasQuery()) {
            final Form query = resourceRef.getQueryAsForm();

            // Tunnel the request method
            final Method method = request.getMethod();
            if (tunnelService.isMethodTunnel()) {
                final String methodName = query.getFirstValue(tunnelService
                        .getMethodParameter());

                Method tunnelledMethod = Method.valueOf(methodName);
                // The OPTIONS method can be tunneled via GET requests.
                if (tunnelledMethod != null
                        && (Method.POST.equals(method) || Method.OPTIONS
                                .equals(tunnelledMethod))) {
                    request.setMethod(tunnelledMethod);
                    query.removeFirst(tunnelService.getMethodParameter());
                    queryModified = true;
                }
            }

            // Tunnel the client preferences
            if (tunnelService.isPreferencesTunnel()) {
                // Get the parameter names to look for
                final String charSetParameter = tunnelService
                        .getCharacterSetParameter();
                final String encodingParameter = tunnelService
                        .getEncodingParameter();
                final String languageParameter = tunnelService
                        .getLanguageParameter();
                final String mediaTypeParameter = tunnelService
                        .getMediaTypeParameter();

                // Get the preferences from the query
                final String acceptedCharSet = query
                        .getFirstValue(charSetParameter);
View Full Code Here

Examples of org.restlet.service.TunnelService

     * @param request
     *            The request to update.
     * @return True if the query has been updated, false otherwise.
     */
    private boolean processExtensions(Request request) {
        final TunnelService tunnelService = getTunnelService();
        boolean extensionsModified = false;

        // Tunnel the client preferences only for GET or HEAD requests
        final Method method = request.getMethod();
        if (tunnelService.isPreferencesTunnel()
                && (method.equals(Method.GET) || method.equals(Method.HEAD))) {
            final Reference resourceRef = request.getResourceRef();

            if (resourceRef.hasExtensions()) {
                final ClientInfo clientInfo = request.getClientInfo();
View Full Code Here

Examples of org.restlet.service.TunnelService

     * @param request
     *            The request to update.
     * @return True if the query has been updated, false otherwise.
     */
    private boolean processQuery(Request request) {
        final TunnelService tunnelService = getTunnelService();
        boolean queryModified = false;
        final Reference resourceRef = request.getResourceRef();

        if (resourceRef.hasQuery()) {
            final Form query = resourceRef.getQueryAsForm(null);

            // Tunnel the request method
            final Method method = request.getMethod();
            if (tunnelService.isMethodTunnel()) {
                final String methodName = query.getFirstValue(tunnelService
                        .getMethodParameter());

                Method tunnelledMethod = Method.valueOf(methodName);
                // The OPTIONS method can be tunnelled via GET requests.
                if (tunnelledMethod != null
                        && (Method.POST.equals(method) || Method.OPTIONS
                                .equals(tunnelledMethod))) {
                    request.setMethod(tunnelledMethod);
                    query.removeFirst(tunnelService.getMethodParameter());
                    queryModified = true;
                }
            }

            // Tunnel the client preferences
            if (tunnelService.isPreferencesTunnel()) {
                // Get the parameter names to look for
                final String charSetParameter = tunnelService
                        .getCharacterSetParameter();
                final String encodingParameter = tunnelService
                        .getEncodingParameter();
                final String languageParameter = tunnelService
                        .getLanguageParameter();
                final String mediaTypeParameter = tunnelService
                        .getMediaTypeParameter();

                // Get the preferences from the query
                final String acceptedCharSet = query
                        .getFirstValue(charSetParameter);
View Full Code Here

Examples of org.restlet.service.TunnelService

     * @param request
     *            The request to update.
     * @return True if the query has been updated, false otherwise.
     */
    private boolean processExtensions(Request request) {
        final TunnelService tunnelService = getTunnelService();
        boolean extensionsModified = false;

        // Tunnel the client preferences only for GET or HEAD requests
        final Method method = request.getMethod();
        if (tunnelService.isPreferencesTunnel()
                && (method.equals(Method.GET) || method.equals(Method.HEAD))) {
            final Reference resourceRef = request.getResourceRef();

            if (resourceRef.hasExtensions()) {
                final ClientInfo clientInfo = request.getClientInfo();
View Full Code Here

Examples of org.restlet.service.TunnelService

     * @param request
     *            The request to update.
     * @return True if the query has been updated, false otherwise.
     */
    private boolean processQuery(Request request) {
        final TunnelService tunnelService = getTunnelService();
        boolean queryModified = false;
        final Reference resourceRef = request.getResourceRef();

        if (resourceRef.hasQuery()) {
            final Form query = resourceRef.getQueryAsForm(null);

            // Tunnel the request method
            final Method method = request.getMethod();
            if (tunnelService.isMethodTunnel()) {
                final String methodName = query.getFirstValue(tunnelService
                        .getMethodParameter());

                Method tunnelledMethod = Method.valueOf(methodName);
                // The OPTIONS method can be tunnelled via GET requests.
                if (tunnelledMethod != null
                        && (Method.POST.equals(method) || Method.OPTIONS
                                .equals(tunnelledMethod))) {
                    request.setMethod(tunnelledMethod);
                    query.removeFirst(tunnelService.getMethodParameter());
                    queryModified = true;
                }
            }

            // Tunnel the client preferences
            if (tunnelService.isPreferencesTunnel()) {
                // Get the parameter names to look for
                final String charSetParameter = tunnelService
                        .getCharacterSetParameter();
                final String encodingParameter = tunnelService
                        .getEncodingParameter();
                final String languageParameter = tunnelService
                        .getLanguageParameter();
                final String mediaTypeParameter = tunnelService
                        .getMediaTypeParameter();

                // Get the preferences from the query
                final String acceptedCharSet = query
                        .getFirstValue(charSetParameter);
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.