public final T newResourceAddress(String location, Map<String, Object> optionsByName) { return newResourceAddress(location, optionsByName, ResourceOptions.FACTORY); }
public final T newResourceAddress(String location) { return newResourceAddress(location, new HashMap<>(EMPTY_OPTIONS)); }
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); } }
/** * 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); }