String createResolvePath(URI httpUri, final String suffixWithLeadingSlash) { return appendURI(ensureTrailingSlash(httpUri),suffixWithLeadingSlash).getPath(); }
String createResolvePath(URI httpUri, final String suffixWithLeadingSlash) { return appendURI(ensureTrailingSlash(httpUri),suffixWithLeadingSlash).getPath(); }
private String createResolvePath(String httpUri, final String suffixWithLeadingSlash) { return URIUtils.getPath(appendURI(ensureTrailingSlash(httpUri),suffixWithLeadingSlash)); }
private ResourceAddress createApiHttpAddress(ResourceAddress httpTransport) { String path = URIUtils.getPath(appendURI(ensureTrailingSlash(httpTransport.getExternalURI()), HttpProtocolCompatibilityFilter.API_PATH)); String httpLocation = modifyURIPath(httpTransport.getExternalURI(), path); ResourceOptions httpOptions = ResourceOptions.FACTORY.newResourceOptions(httpTransport); httpOptions.setOption(NEXT_PROTOCOL, null); // terminal endpoint, so next protocol null httpOptions.setOption(ALTERNATE, null); return resourceAddressFactory.newResourceAddress(httpLocation, httpOptions); }
private ResourceAddress createApiHttpxeAddress(ResourceAddress httpxeTransport) { String path = URIUtils.getPath(appendURI(ensureTrailingSlash(httpxeTransport.getExternalURI()), HttpProtocolCompatibilityFilter.API_PATH)); httpxeTransport = httpxeTransport.resolve(path); String httpxeLocation = modifyURIPath(httpxeTransport.getExternalURI(), path); ResourceOptions httpxeOptions = ResourceOptions.FACTORY.newResourceOptions(httpxeTransport); httpxeOptions.setOption(NEXT_PROTOCOL, null); // terminal endpoint, so next protocol null return resourceAddressFactory.newResourceAddress(httpxeLocation, httpxeOptions); }
private ResourceAddress createApiAddress(ResourceAddress address) { ResourceAddress transport = address.getTransport(); ResourceOptions apiAddressOptions = ResourceOptions.FACTORY.newResourceOptions(transport); // /;api/operation is a terminal endpoint so next protocol should be null apiAddressOptions.setOption(NEXT_PROTOCOL, null); // even if the address has an alternate, do not bind the alternate apiAddressOptions.setOption(BIND_ALTERNATE, Boolean.FALSE); String path = URIUtils.getPath(appendURI(ensureTrailingSlash(address.getExternalURI()), HttpProtocolCompatibilityFilter.API_PATH)); String apiLocation = URIUtils.modifyURIPath(URIUtils.uriToString(transport.getResource()), path); return resourceAddressFactory.newResourceAddress(apiLocation, apiAddressOptions); }
URI remoteLocation = ensureTrailingSlash(modifyURIScheme(remoteBridgeAddress.getResource(), "wse")); ResourceOptions options = ResourceOptions.FACTORY.newResourceOptions(); options.setOption(TRANSPORT, remoteBridgeAddress);
String uri = appendURI(ensureTrailingSlash(httpxeAddress.getExternalURI()), CREATE_SUFFIX); String query = URIUtils.getQuery(uri); String pathAndQuery = URIUtils.getPath(uri);