Create and return a new variation service with the specified endpoint URL.

@param endpointUrl endpoint URL, must not be null
@return a new variation service with the specified endpoint URL
164417
public VariationService createVariationService(final String endpointUrl) {
        return new RestAdapter.Builder()
            .setEndpoint(endpointUrl)
            .setErrorHandler(errorHandler)
            .setConverter(new JacksonVariationConverter(jsonFactory))
            .build().create(VariationService.class);
    }
1258106
function (endPoint, request, response) {
                var self = this,
                    context,
                    requestHandler,
                    handledWithErrorHandler = false,
                    buffers = [],
                    bufferLength = 0;

                // create a new application domain for the request
                var domain = Domain.create();

                domain.add(request);
                domain.add(response);

                // request.setEncoding('utf8');

                request.on('data', function (chunk) {
                    buffers.push(chunk);
                    bufferLength += chunk.length;
                });

                response.on('close', function () {
                    domain.dispose();
                });

                domain.on('error', handleError);


                request.on('end', function () {

                    request.body = new Buffer(bufferLength);

                    var pos = 0;

                    for (var i = 0; i < buffers.length; i++) {
                        buffers[i].copy(request.body, pos);
                        pos += buffers[i].length;
                    }

                    request.body.content = request.body.toString();

                    buffers = null;

                    domain.run(function () {
                        // create the new context object
                        context = new Context(self, endPoint, request, response);

                        // and set the chosen handler
                        requestHandler = self.$handlers.getRequestHandler(context);
                        context.handler = requestHandler;

                        flow()
                            .seq(function (cb) {
                                context._executeHook("beginRequest", cb);
                            })
                            .seq(function (cb) {
                                if (requestHandler.$.autoStartSession) {
                                    context.session.start(cb);
                                } else {
                                    cb();
                                }
                            })
                            .seq(function (cb) {
                                requestHandler.handleRequest(context, cb);
                            })
                            .exec(function (err) {
                                if (err) {
                                    handleError(err);
                                } else {
                                    context.response.end();
                                }
                            });
                    });
                });

                function handleError(err) {

                    if (!handledWithErrorHandler) {
                        handledWithErrorHandler = true;

                        var exceptionHandler = new ExceptionHandler(err);
                        try {
                            exceptionHandler.handleRequest(context, function (err) {
                                err && handleErrorTheHardWay(err);
                            });
                        } catch (e) {
                            handleErrorTheHardWay(err);
                        }

                    } else {
                        // error handler didn't do the job well
                        handleErrorTheHardWay(err);
                    }
                }

                function handleErrorTheHardWay(error) {

                    console.error(error);

                    try {
                        response.writeHead(500);
                    } catch (error) {
                        console.error('Error sending 500', error, request.url);
                    }

                    response.end('Internal Server Error');
                    domain.dispose();
                }

            }
205294
public static void get(String url, HttpConsumer<HttpExchange> endpoint, MediaTypes... mediaTypes) {
        addResource(Methods.GET, url, endpoint, mediaTypes);
    }
561570
private String getURL(String endpoint, int version, String method) {
        StringBuilder sb = new StringBuilder();
        sb.append(endpoint);
        if (!endpoint.endsWith(FORWARD_SLASH)) {
            sb.append(FORWARD_SLASH);
        }
        sb.append(VERSION_PREFIX + version + FORWARD_SLASH + method);
        return sb.toString();
    }
302439
public EndpointInfo build(EndpointInfoBuilderContext ctx, String serviceImplBeanClassName, EndpointType endpointType) throws UnableToAdaptException {

        EndpointInfo endpointInfo = new EndpointInfo(serviceImplBeanClassName, endpointType);
        endpointInfo.setBeanName((String) ctx.getContextEnv(JaxWsConstants.ENV_ATTRIBUTE_ENDPOINT_BEAN_NAME));
        endpointInfo.setServletName((String) ctx.getContextEnv(JaxWsConstants.ENV_ATTRIBUTE_ENDPOINT_SERVLET_NAME));

        invokeConfigurators(ctx, ConfigMethod.PREPARE, endpointInfo);
        invokeConfigurators(ctx, ConfigMethod.CONFIG, endpointInfo);

        validate(ctx, endpointInfo);

        ctx.clearContextEnv();

        return endpointInfo;
    }
617649
def create_endpoint(service_name: str, *,
                    ipv4: OptStr = None,
                    ipv6: OptStr = None,
                    port: OptInt = None) -> Endpoint:
    
    return Endpoint(service_name, ipv4, ipv6, port)
240822
public ArchiveService createArchiveService(final String endpointUrl) {
        return new RestAdapter.Builder()
            .setEndpoint(endpointUrl)
            .setErrorHandler(errorHandler)
            .setConverter(new JacksonArchivedSequenceConverter(jsonFactory))
            .build().create(ArchiveService.class);
    }
444776
public static Endpoint merge(Endpoint defaults, Endpoint override) {

        if (defaults == null) {
            defaults = new Endpoint();
        }

        if (override == null) {
            override = new Endpoint();
        }

        final Endpoint merged = new Endpoint();

        merged.setCredentialScope(override.getCredentialScope() != null
                ? override.getCredentialScope()
                : defaults.getCredentialScope());

        merged.setHostName(override.getHostName() != null
                ? override.getHostName()
                : defaults.getHostName());

        merged.setSslCommonName(override.getSslCommonName() != null
                ? override.getSslCommonName()
                : defaults.getSslCommonName());

        merged.setProtocols(override.getProtocols() != null
                ? override.getProtocols()
                : defaults.getProtocols());

        merged.setSignatureVersions(override.getSignatureVersions() != null
                ? override.getSignatureVersions()
                : defaults.getSignatureVersions()
        );

        return merged;

    }
254643
public static HttpEndpointImpl findEndpoint(String endpointId) {
        for (HttpEndpointImpl i : instance.get()) {
            if (i.getName().equals(endpointId))
                return i;
        }
        return null;
    }
223125
public synchronized PacketTransportEndpoint createEndpoint() throws JMSException
    {
        if (closed || transport.isClosed())
            throw new FFMQException("Transport is closed", "TRANSPORT_CLOSED");
        
        PacketTransportEndpoint endpoint = new PacketTransportEndpoint(nextEndpointId++, this);
        registeredEndpoints.put(Integer.valueOf(endpoint.getId()), endpoint);
        return endpoint;
    }
342719
public void changeEndpoint(String endpoint) throws ConnectionEndpointArray.UnknownSchemeException {
        if (endpoint != null && !endpoint.isEmpty()) {
            modules.getApiModule().changeEndpoint(endpoint);
        } else {
            modules.getApiModule().resetToDefaultEndpoints();
        }
    }
659703
private URI toURI(String endpoint) throws IllegalArgumentException {

        if (endpoint.contains("://") == false) {
            endpoint = Protocol.HTTPS + "://" + endpoint;
        }

        try {
            return new URI(endpoint);
        } catch (URISyntaxException e) {
            throw new IllegalArgumentException(e);
        }
    }
589157
public static URI toUri(String endpoint, ClientConfiguration config) {

        if (config == null) {
            throw new IllegalArgumentException("ClientConfiguration cannot be null");
        }
        return toUri(endpoint, config.getProtocol());
    }
611684
private function buildUrl($endpoint, $url_parameters = [], $special_url = null)
    {
        foreach ($url_parameters as $key => $value) {
            //@codeCoverageIgnoreStart
            $endpoint = str_replace('{'.$key.'}', $value, $endpoint);
            //@codeCoverageIgnoreEnd
        }

        if (is_null($special_url)) {
            $url = trim($this->api_base_url, "/ \t\n\r\0\x0B");
        } else {
            $url = $special_url;
        }
        $url = $url.'/'.trim($endpoint, "/ \t\n\r\0\x0B");

        return $url;
    }
912101
public static ServiceDependencyBuilder restServiceDependency(final String url) {
        return new ServiceDependencyBuilder()
                .withUrl(url)
                .withType(ServiceDependency.TYPE_SERVICE)
                .withSubtype(ServiceDependency.SUBTYPE_REST)
                .withMethods(singletonList("GET"))
                .withMediaTypes(singletonList("application/json"));
    }
1258077
def create_url_adapter(self, request: Optional[BaseRequestWebsocket]) -> Optional[MapAdapter]:
        
        if request is not None:
            host = request.host
            return self.url_map.bind_to_request(
                request.scheme, host, request.method, request.path, request.query_string,
            )

        if self.config['SERVER_NAME'] is not None:
            return self.url_map.bind(
                self.config['PREFERRED_URL_SCHEME'], self.config['SERVER_NAME'],
            )
        return None
818914
public URL copyWithService(String serviceUUID) {
        return new URL(this.protocol, this.adapterAddress, this.deviceAddress, this.deviceAttributes,
                serviceUUID, null, null);
    }