public class URL extends Object implements Serializable
url example:
Some strange example below:
URL,
URI,
Serialized Form| Constructor and Description |
|---|
URL(String protocol,
String host,
int port) |
URL(String protocol,
String host,
int port,
Map<String,String> parameters) |
URL(String protocol,
String host,
int port,
String path) |
URL(String protocol,
String host,
int port,
String[] pairs) |
URL(String protocol,
String host,
int port,
String path,
Map<String,String> parameters) |
URL(String protocol,
String host,
int port,
String path,
String... pairs) |
URL(String protocol,
String username,
String password,
String host,
int port,
String path) |
URL(String protocol,
String username,
String password,
String host,
int port,
String path,
Map<String,String> parameters) |
URL(String protocol,
String username,
String password,
String host,
int port,
String path,
String... pairs) |
URL(URLAddress urlAddress,
URLParam urlParam) |
URL(URLAddress urlAddress,
URLParam urlParam,
Map<String,Object> attributes) |
public URL(URLAddress urlAddress, URLParam urlParam)
public URL(URLAddress urlAddress, URLParam urlParam, Map<String,Object> attributes)
public URL(String protocol, String username, String password, String host, int port, String path)
public URL(String protocol, String username, String password, String host, int port, String path, String... pairs)
public static URL valueOf(String url)
url, - decoded url stringpublic static URL valueOf(String url, ScopeModel scopeModel)
public static URL valueOf(String url, boolean encoded)
url, - url stringencoded, - encoded or decodedpublic URLAddress getUrlAddress()
public URLParam getUrlParam()
public String getProtocol()
public String getUsername()
public String getPassword()
public String getAuthority()
public String getUserInformation()
public String getHost()
public int getPort()
public URL setPort(int port)
public int getPort(int defaultPort)
public String getAddress()
public String getIp()
public String getBackupAddress()
public String getBackupAddress(int defaultPort)
public String getPath()
public String getAbsolutePath()
public Map<String,String> getParameters(Predicate<String> nameToSelect)
public <T> T getParameter(String key, Class<T> valueType)
T - the type of parameter valuekey - the key of parametervalueType - the type of parameter valuenullpublic <T> T getParameter(String key, Class<T> valueType, T defaultValue)
T - the type of parameter valuekey - the key of parametervalueType - the type of parameter valuedefaultValue - the default value if parameter is absentdefaultValue will be used.public URL setScopeModel(ScopeModel scopeModel)
public ScopeModel getScopeModel()
public FrameworkModel getOrDefaultFrameworkModel()
public ApplicationModel getOrDefaultApplicationModel()
public ApplicationModel getApplicationModel()
public ModuleModel getOrDefaultModuleModel()
public URL setServiceModel(ServiceModel serviceModel)
public ServiceModel getServiceModel()
public double getParameter(String key, double defaultValue)
public float getParameter(String key, float defaultValue)
public long getParameter(String key, long defaultValue)
public int getParameter(String key, int defaultValue)
public short getParameter(String key, short defaultValue)
public byte getParameter(String key, byte defaultValue)
public float getPositiveParameter(String key, float defaultValue)
public double getPositiveParameter(String key, double defaultValue)
public long getPositiveParameter(String key, long defaultValue)
public int getPositiveParameter(String key, int defaultValue)
public short getPositiveParameter(String key, short defaultValue)
public byte getPositiveParameter(String key, byte defaultValue)
public char getParameter(String key, char defaultValue)
public boolean getParameter(String key, boolean defaultValue)
public boolean hasParameter(String key)
public String getMethodParameterAndDecoded(String method, String key, String defaultValue)
public double getMethodPositiveParameter(String method, String key, double defaultValue)
public float getMethodPositiveParameter(String method, String key, float defaultValue)
public long getMethodPositiveParameter(String method, String key, long defaultValue)
public int getMethodPositiveParameter(String method, String key, int defaultValue)
public short getMethodPositiveParameter(String method, String key, short defaultValue)
public byte getMethodPositiveParameter(String method, String key, byte defaultValue)
public boolean getMethodParameter(String method, String key, boolean defaultValue)
public boolean hasMethodParameter(String method)
public boolean isLocalHost()
public boolean isAnyHost()
public URL addParameter(String key, CharSequence value)
public URL addParameters(Map<String,String> parameters)
parameters - parameters in key-value pairspublic URL removeParameters(Collection<String> keys)
public URL clearParameters()
public String toIdentityString()
public String toFullString()
public String toParameterString()
public URL toJavaURL()
public InetSocketAddress toInetSocketAddress()
public String getColonSeparatedKey()
public String getServiceKey()
public String getDisplayServiceKey()
public String getPathKey()
public String getProtocolServiceKey()
public String toServiceStringWithoutResolving()
public String toServiceString()
@Deprecated public String getServiceName()
public String getServiceInterface()
@Deprecated public int getIntParameter(String key)
getParameter(String, int)getParameter(String, int)@Deprecated public int getIntParameter(String key, int defaultValue)
getParameter(String, int)getParameter(String, int)@Deprecated public int getPositiveIntParameter(String key, int defaultValue)
getPositiveParameter(String, int)getPositiveParameter(String, int)@Deprecated public boolean getBooleanParameter(String key)
getParameter(String, boolean)getParameter(String, boolean)@Deprecated public boolean getBooleanParameter(String key, boolean defaultValue)
getParameter(String, boolean)getParameter(String, boolean)@Deprecated public int getMethodIntParameter(String method, String key)
getMethodParameter(String, String, int)getMethodParameter(String, String, int)@Deprecated public int getMethodIntParameter(String method, String key, int defaultValue)
getMethodParameter(String, String, int)getMethodParameter(String, String, int)@Deprecated public int getMethodPositiveIntParameter(String method, String key, int defaultValue)
getMethodPositiveParameter(String, String, int)@Deprecated public boolean getMethodBooleanParameter(String method, String key)
getMethodParameter(String, String, boolean)@Deprecated public boolean getMethodBooleanParameter(String method, String key, boolean defaultValue)
getMethodParameter(String, String, boolean)public Configuration toConfiguration()
public static void putMethodParameter(String method, String key, String value, Map<String,Map<String,String>> methodParameters)
public String getApplication()
public String getRemoteApplication()
public String getGroup()
public String getVersion()
public String getCategory()
public String getSide()
public boolean hasAttribute(String key)
public String getServiceParameter(String service, String key, String defaultValue)
public double getServiceParameter(String service, String key, double defaultValue)
public float getServiceParameter(String service, String key, float defaultValue)
public short getServiceParameter(String service, String key, short defaultValue)
public boolean getServiceParameter(String service, String key, boolean defaultValue)
public float getPositiveServiceParameter(String service, String key, float defaultValue)
public double getPositiveServiceParameter(String service, String key, double defaultValue)
public long getPositiveServiceParameter(String service, String key, long defaultValue)
public int getPositiveServiceParameter(String service, String key, int defaultValue)
public short getPositiveServiceParameter(String service, String key, short defaultValue)
public byte getPositiveServiceParameter(String service, String key, byte defaultValue)
public String getServiceMethodParameterAndDecoded(String service, String method, String key)
public String getServiceMethodParameterAndDecoded(String service, String method, String key, String defaultValue)
public String getServiceMethodParameterStrict(String service, String method, String key)
public String getServiceMethodParameter(String service, String method, String key)
public String getServiceMethodParameter(String service, String method, String key, String defaultValue)
public double getServiceMethodParameter(String service, String method, String key, double defaultValue)
public float getServiceMethodParameter(String service, String method, String key, float defaultValue)
public long getServiceMethodParameter(String service, String method, String key, long defaultValue)
public int getServiceMethodParameter(String service, String method, String key, int defaultValue)
public short getServiceMethodParameter(String service, String method, String key, short defaultValue)
public byte getServiceMethodParameter(String service, String method, String key, byte defaultValue)
public boolean hasServiceMethodParameter(String service, String method, String key)
public URL toSerializableURL()
Copyright © 2011–2020 The Apache Software Foundation. All rights reserved.