/** * Constructor for a protocol, host name and host port * * @param protocol * Protocol/scheme to use * @param hostName * The host name or IP address. * @param hostPort * The host port (default ports are correctly ignored). */ public Reference(Protocol protocol, String hostName, int hostPort) { this(protocol.getSchemeName(), hostName, hostPort, null, null, null); }
/** * Constructor for a protocol, host name and host port * * @param protocol * Protocol/scheme to use * @param hostName * The host name or IP address. * @param hostPort * The host port (default ports are correctly ignored). */ public Reference(Protocol protocol, String hostName, int hostPort) { this(protocol.getSchemeName(), hostName, hostPort, null, null, null); }
/** * Constructor for a protocol, host name and host port * * @param protocol * Protocol/scheme to use * @param hostName * The host name or IP address. * @param hostPort * The host port (default ports are correctly ignored). */ public Reference(Protocol protocol, String hostName, int hostPort) { this(protocol.getSchemeName(), hostName, hostPort, null, null, null); }
/** * Sets the scheme component based on this protocol. * * @param protocol * The protocol of the scheme component. */ public void setProtocol(Protocol protocol) { setScheme(protocol.getSchemeName()); }
/** * Sets the scheme component based on this protocol. * * @param protocol * The protocol of the scheme component. */ public void setProtocol(Protocol protocol) { setScheme(protocol.getSchemeName()); }
/** * Sets the scheme component based on this protocol. * * @param protocol * The protocol of the scheme component. */ public void setProtocol(Protocol protocol) { setScheme(protocol.getSchemeName()); }
@Override protected void handleLocal(Request request, Response response, String decodedPath) { String scheme = request.getResourceRef().getScheme(); if (!FILE.getSchemeName().equalsIgnoreCase(scheme)) { throw new IllegalArgumentException(format( "Protocol \"%s\" not supported by the connector. Only FILE is supported.", scheme)); } handleFile(request, response, decodedPath); }
@Override public void handle(Request request, Response response) { final String scheme = request.getResourceRef().getScheme(); if (Protocol.WAR.getSchemeName().equalsIgnoreCase(scheme)) { super.handle(request, response); } else { throw new IllegalArgumentException( "Protocol \"" + scheme + "\" not supported by the connector. Only WAR is supported."); } }
@Override public void handle(Request request, Response response) { final String scheme = request.getResourceRef().getScheme(); if (Protocol.WAR.getSchemeName().equalsIgnoreCase(scheme)) { super.handle(request, response); } else { throw new IllegalArgumentException( "Protocol \"" + scheme + "\" not supported by the connector. Only WAR is supported."); } }
@Override protected void handleLocal(Request request, Response response, String decodedPath) { String scheme = request.getResourceRef().getScheme(); if (scheme.equalsIgnoreCase(Protocol.OBAP.getSchemeName())) { Bundle bundle = BUNDLE_CACHE.get(request.getResourceRef() .getAuthority()); getLogger().fine( "Look for bundle " + request.getResourceRef().getAuthority()); handleBundle(request, response, bundle); } else { throw new IllegalArgumentException( "Protocol \"" + scheme + "\" not supported by the connector. Only OBAP is supported."); } }
String scheme = request.getResourceRef().getScheme(); if (scheme.equalsIgnoreCase(Protocol.CLAP.getSchemeName())) { LocalReference cr = new LocalReference(request.getResourceRef()); ClassLoader classLoader = null;
String scheme = getOriginalRef().getScheme(); if (!Protocol.RIAP.getSchemeName().equals(scheme)) { throw new ResourceException(Status.CLIENT_ERROR_BAD_REQUEST, "Auth server only allows local resource validation");
Endpoint endpoint = new Endpoint(baseRef.getHostDomain(), baseRef.getHostPort(), baseRef.getSchemeProtocol() .getSchemeName(), baseRef.getPath(), scheme); definition.getEndpoints().add(endpoint); Protocol.HTTP.getSchemeName(), "/v1", scheme); definition.getEndpoints().add(endpoint);
Endpoint endpoint = new Endpoint(baseRef.getHostDomain(), baseRef.getHostPort(), baseRef.getSchemeProtocol() .getSchemeName(), baseRef.getPath(), scheme); definition.getEndpoints().add(endpoint); Protocol.HTTP.getSchemeName(), "/v1", scheme); definition.getEndpoints().add(endpoint);
Endpoint endpoint = new Endpoint(baseRef.getHostDomain(), baseRef.getHostPort(), baseRef.getSchemeProtocol() .getSchemeName(), baseRef.getPath(), scheme); definition.getEndpoints().add(endpoint); Protocol.HTTP.getSchemeName(), "/v1", scheme); definition.getEndpoints().add(endpoint);
Endpoint endpoint = new Endpoint(baseRef.getHostDomain(), baseRef.getHostPort(), baseRef.getSchemeProtocol() .getSchemeName(), baseRef.getPath(), scheme); definition.getEndpoints().add(endpoint); Protocol.HTTP.getSchemeName(), "/v1", scheme); definition.getEndpoints().add(endpoint);
Endpoint endpoint = new Endpoint(baseRef.getHostDomain(), baseRef.getHostPort(), baseRef.getSchemeProtocol() .getSchemeName(), baseRef.getPath(), scheme); definition.getEndpoints().add(endpoint); Protocol.HTTP.getSchemeName(), "/v1", scheme); definition.getEndpoints().add(endpoint);
/** * Creates the protocol associated to a URI scheme name. If an existing * constant exists then it is returned, otherwise a new instance is created. * * @param name * The scheme name. * @param version * The version number. * @return The associated protocol. */ public static Protocol valueOf(String name, String version) { Protocol result = valueOf(name); if (!version.equals(result.getVersion())) { result = new Protocol(result.getSchemeName(), result.getName(), result.getTechnicalName(), result.getDescription(), result.getDefaultPort(), result.isConfidential(), version); } return result; }
/** * Creates the protocol associated to a URI scheme name. If an existing * constant exists then it is returned, otherwise a new instance is created. * * @param name * The scheme name. * @param version * The version number. * @return The associated protocol. */ public static Protocol valueOf(String name, String version) { Protocol result = valueOf(name); if (!version.equals(result.getVersion())) { result = new Protocol(result.getSchemeName(), result.getName(), result.getTechnicalName(), result.getDescription(), result.getDefaultPort(), result.isConfidential(), version); } return result; }
final String scheme = request.getResourceRef().getScheme(); if (Protocol.RIAP.getSchemeName().equalsIgnoreCase(scheme)) {