/** * Indicates if the reference is absolute. * * @return True if the reference is absolute. */ public boolean isAbsolute() { return (getScheme() != null); }
/** * Indicates if the reference is absolute. * * @return True if the reference is absolute. */ public boolean isAbsolute() { return (getScheme() != null); }
/** * Indicates if the reference is relative. * * @return True if the reference is relative. */ public boolean isRelative() { return (getScheme() == null); }
/** * Indicates if the reference is relative. * * @return True if the reference is relative. */ public boolean isRelative() { return (getScheme() == null); }
/** * Indicates if the reference is absolute. * * @return True if the reference is absolute. */ public boolean isAbsolute() { return (getScheme() != null); }
/** * Indicates if the reference is relative. * * @return True if the reference is relative. */ public boolean isRelative() { return (getScheme() == null); }
/** * Returns the optionnally decoded scheme component. * * @param decode * Indicates if the result should be decoded using the * {@link #decode(String)} method. * @return The optionnally decoded scheme component. * @see #getScheme() */ public String getScheme(boolean decode) { return decode ? decode(getScheme()) : getScheme(); }
/** * Returns the optionnally decoded scheme component. * * @param decode * Indicates if the result should be decoded using the {@link #decode(String)} method. * @return The optionnally decoded scheme component. * @see #getScheme() */ public String getScheme(boolean decode) { return decode ? decode(getScheme()) : getScheme(); }
/** * Returns the optionnally decoded scheme component. * * @param decode * Indicates if the result should be decoded using the * {@link #decode(String)} method. * @return The optionnally decoded scheme component. * @see #getScheme() */ public String getScheme(boolean decode) { return decode ? decode(getScheme()) : getScheme(); }
/** * Returns the host identifier. Includes the scheme, the host name and the * host port number.<br> * Note that no URI decoding is done by this method. * * @return The host identifier. */ public String getHostIdentifier() { final StringBuilder result = new StringBuilder(); result.append(getScheme()).append("://").append(getAuthority()); return result.toString(); }
/** * Returns the protocol associated with the scheme component. * * @return The protocol associated with the scheme component. */ public Protocol getSchemeProtocol() { return Protocol.valueOf(getScheme()); }
/** * Returns the protocol associated with the scheme component. * * @return The protocol associated with the scheme component. */ public Protocol getSchemeProtocol() { return Protocol.valueOf(getScheme()); }
/** * Returns the host identifier. Includes the scheme, the host name and the * host port number.<br> * Note that no URI decoding is done by this method. * * @return The host identifier. */ public String getHostIdentifier() { final StringBuilder result = new StringBuilder(); result.append(getScheme()).append("://").append(getAuthority()); return result.toString(); }
/** * Returns the protocol associated with the scheme component. * * @return The protocol associated with the scheme component. */ public Protocol getSchemeProtocol() { return Protocol.valueOf(getScheme()); }
/** * Returns the host identifier. Includes the scheme, the host name and the * host port number.<br> * Note that no URI decoding is done by this method. * * @return The host identifier. */ public String getHostIdentifier() { final StringBuilder result = new StringBuilder(); result.append(getScheme()).append("://").append(getAuthority()); return result.toString(); }
@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."); } }
public void handle(Request request, Response response) { if (request.getResourceRef().getScheme().equalsIgnoreCase("clap")) { request.getAttributes().put("org.restlet.clap.classLoader", bundleClassLoader); } dispatcher.handle(request, response); } }
@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."); } }