/** * Creates a new resource address for the given location and options * * @param options cannot be null, otherwise NullPointerException is thrown * @return resource address */ public ResourceAddress newResourceAddress(String location, ResourceOptions options) { return newResourceAddress(location, options, null /* qualifier */); }
@SuppressWarnings("rawtypes") public static ResourceAddressFactory newResourceAddressFactory( ClassLoader classLoader) { return ResourceAddressFactory.newResourceAddressFactory(classLoader); }
@SuppressWarnings("rawtypes") public static ResourceAddressFactory newResourceAddressFactory( ClassLoader classLoader) { ServiceLoader<ResourceAddressFactorySpi> loader = loadResourceAddressFactorySpi(classLoader); ResourceAddressFactory resourceAddressFactory = new ResourceAddressFactory(addressFactories, alternateAddressFactories);
/** * Creates a new resource address for the given location and options * * @param options cannot be null, otherwise NullPointerException is thrown * @return resource address */ public ResourceAddress newResourceAddress(String location, ResourceOptions options, Object qualifier) { Objects.requireNonNull(options, "options cannot be null"); ResourceAddressFactorySpi<?> resourceAddressFactory = findResourceAddressFactory(getScheme(location)); return resourceAddressFactory.newResourceAddress(location, options, qualifier); }
public ResourceAddress newResourceAddress(String location, Map<String, Object> options) { ResourceAddressFactorySpi<?> resourceAddressFactory = findResourceAddressFactory(getScheme(location)); return resourceAddressFactory.newResourceAddress(location, options, ResourceOptions.FACTORY); }
public ResourceAddress newResourceAddress(String location) { Map<String, Object> EMPTY_OPTIONS = Collections.emptyMap(); return newResourceAddress(location, EMPTY_OPTIONS); }
private ResourceAddressFactory resolveResourceAddressFactories() { return ResourceAddressFactory.newResourceAddressFactory(); }
public ResourceAddress newResourceAddress(final String location, final Map<String, Object> options, final String nextProtocol) { ResourceAddressFactorySpi<?> resourceAddressFactory = findResourceAddressFactory(getScheme(location)); if (nextProtocol != null) { return resourceAddressFactory.newResourceAddress(location, options, new ResourceOptions.Factory() { @Override public ResourceOptions newResourceOptions(ResourceOptions defaults) { ResourceOptions newOptions = ResourceOptions.FACTORY.newResourceOptions(defaults); newOptions.setOption(NEXT_PROTOCOL, nextProtocol); return newOptions; } @Override public ResourceOptions newResourceOptions() { ResourceOptions newOptions = ResourceOptions.FACTORY.newResourceOptions(); newOptions.setOption(NEXT_PROTOCOL, nextProtocol); return newOptions; } }); } else { return resourceAddressFactory.newResourceAddress(location, options, ResourceOptions.FACTORY); } }
private ResourceAddress newResourceAddress(InetSocketAddress inetSocketAddress, final String transportName) { InetAddress inetAddress = inetSocketAddress.getAddress(); String hostAddress = inetAddress.getHostAddress(); String addressFormat = (inetAddress instanceof Inet6Address) ? "%s://[%s]:%s" : "%s://%s:%s"; int port = inetSocketAddress.getPort(); String transport = format(addressFormat, transportName, hostAddress, port); return addressFactory.newResourceAddress(transport); } }
public static ResourceAddressFactory newResourceAddressFactory() { return newResourceAddressFactory(currentThread().getContextClassLoader()); }
private ResourceAddress newResourceAddress(InetSocketAddress inetSocketAddress, final String transportName, String nextProtocol) { InetAddress inetAddress = inetSocketAddress.getAddress(); String hostAddress = inetAddress.getHostAddress(); String addressFormat = (inetAddress instanceof Inet6Address) ? "%s://[%s]:%s" : "%s://%s:%s"; int port = inetSocketAddress.getPort(); String transport = format(addressFormat, transportName, hostAddress, port); return resourceAddressFactory.newResourceAddress(transport, nextProtocol); }
1, TransportFactory.newTransportFactory(Collections.EMPTY_MAP), ResourceAddressFactory.newResourceAddressFactory(), null, null
private ResourceAddress newResourceAddress(NamedPipeAddress namedPipeAddress, final String transportName, String nextProtocol) { String addressFormat = "%s://%s"; String pipeName = namedPipeAddress.getPipeName(); String transport = format(addressFormat, transportName, pipeName); return resourceAddressFactory.newResourceAddress(transport, nextProtocol); }
private ResourceAddress newResourceAddress(NamedPipeAddress namedPipeAddress, final String transportName) { String addressFormat = "%s://%s"; String pipeName = namedPipeAddress.getPipeName(); String transport = format(addressFormat, transportName, pipeName); return addressFactory.newResourceAddress(transport); }
private ResourceAddress createResourceAddress(InetSocketAddress inetSocketAddress, String nextProtocol) { String transportName = getTransportName(); InetAddress inetAddress = inetSocketAddress.getAddress(); String hostAddress = inetAddress.getHostAddress(); String addressFormat = (inetAddress instanceof Inet6Address) ? "%s://[%s]:%s" : "%s://%s:%s"; int port = inetSocketAddress.getPort(); String transport = format(addressFormat, transportName, hostAddress, port); return addressFactory.newResourceAddress(transport, nextProtocol); }
private ResourceAddress createResourceAddress(InetSocketAddress inetSocketAddress, String nextProtocol) { String transportName = getTransportName(); InetAddress inetAddress = inetSocketAddress.getAddress(); String hostAddress = inetAddress.getHostAddress(); String addressFormat = (inetAddress instanceof Inet6Address) ? "%s://[%s]:%s" : "%s://%s:%s"; int port = inetSocketAddress.getPort(); String transport = format(addressFormat, transportName, hostAddress, port); return resourceAddressFactory.newResourceAddress(transport, nextProtocol); } });
protected ResourceAddress createResourceAddress(InetSocketAddress inetSocketAddress) { String transport = asResourceURI(inetSocketAddress); return resourceAddressFactory.newResourceAddress(transport); }
public ResourceAddress newResourceAddress(String location, String nextProtocol) { if (nextProtocol != null) { ResourceOptions options = ResourceOptions.FACTORY.newResourceOptions(); options.setOption(NEXT_PROTOCOL, nextProtocol); return newResourceAddress(location, options); } else { return newResourceAddress(location); } }
private ResourceAddress getSslSessionRemoteAddress(IoSession session, ResourceAddress localSslAddress) { return resourceAddressFactory.newResourceAddress(localSslAddress, REMOTE_ADDRESS.get(session)); }
private ResourceAddress createResourceAddress(NamedPipeAddress namedPipeAddress, String nextProtocol) { String transportName = getTransportName(); String addressFormat = "%s://%s"; String pipeName = namedPipeAddress.getPipeName(); String transport = format(addressFormat, transportName, pipeName); return addressFactory.newResourceAddress(transport, nextProtocol); }