Package org.glassfish.jersey.client
Class JerseyWebTarget
java.lang.Object
org.glassfish.jersey.client.JerseyWebTarget
- All Implemented Interfaces:
WebTarget,Configurable<WebTarget>,Initializable<JerseyWebTarget>
Jersey implementation of
JAX-RS client target
contract.- Author:
- Marek Potociar
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedJerseyWebTarget(UriBuilder uriBuilder, ClientConfig clientConfig) Create new web target instance.protectedJerseyWebTarget(UriBuilder uriBuilder, JerseyWebTarget that) Create new web target instance. -
Method Summary
Modifier and TypeMethodDescriptionGet a live view of an internal client configuration state of this initializable instance.getUri()matrixParam(String name, Object... values) Pre-initializes the runtime and runtimeconfigurationof this component in order to improve performance during the first request.queryParam(String name, Object... values) request()resolveTemplate(String name, Object value) resolveTemplate(String name, Object value, boolean encodeSlashInPath) resolveTemplateFromEncoded(String name, Object value) resolveTemplates(Map<String, Object> templateValues) resolveTemplates(Map<String, Object> templateValues, boolean encodeSlashInPath) resolveTemplatesFromEncoded(Map<String, Object> templateValues) toString()
-
Constructor Details
-
JerseyWebTarget
Create new web target instance.- Parameters:
uriBuilder- builder for the target URI.that- original target to copy the internal data from.
-
JerseyWebTarget
Create new web target instance.- Parameters:
uriBuilder- builder for the target URI.clientConfig- target configuration.
-
-
Method Details
-
getUri
-
getUriBuilder
- Specified by:
getUriBuilderin interfaceWebTarget
-
path
- Specified by:
pathin interfaceWebTarget- Throws:
NullPointerException
-
matrixParam
- Specified by:
matrixParamin interfaceWebTarget- Throws:
NullPointerException
-
queryParam
- Specified by:
queryParamin interfaceWebTarget- Throws:
NullPointerException
-
request
-
request
-
request
-
resolveTemplate
- Specified by:
resolveTemplatein interfaceWebTarget- Throws:
NullPointerException
-
resolveTemplate
public JerseyWebTarget resolveTemplate(String name, Object value, boolean encodeSlashInPath) throws NullPointerException - Specified by:
resolveTemplatein interfaceWebTarget- Throws:
NullPointerException
-
resolveTemplateFromEncoded
public JerseyWebTarget resolveTemplateFromEncoded(String name, Object value) throws NullPointerException - Specified by:
resolveTemplateFromEncodedin interfaceWebTarget- Throws:
NullPointerException
-
resolveTemplates
public JerseyWebTarget resolveTemplates(Map<String, Object> templateValues) throws NullPointerException- Specified by:
resolveTemplatesin interfaceWebTarget- Throws:
NullPointerException
-
resolveTemplates
public JerseyWebTarget resolveTemplates(Map<String, Object> templateValues, boolean encodeSlashInPath) throws NullPointerException- Specified by:
resolveTemplatesin interfaceWebTarget- Throws:
NullPointerException
-
resolveTemplatesFromEncoded
public JerseyWebTarget resolveTemplatesFromEncoded(Map<String, Object> templateValues) throws NullPointerException- Specified by:
resolveTemplatesFromEncodedin interfaceWebTarget- Throws:
NullPointerException
-
register
- Specified by:
registerin interfaceConfigurable<WebTarget>
-
register
- Specified by:
registerin interfaceConfigurable<WebTarget>
-
register
- Specified by:
registerin interfaceConfigurable<WebTarget>
-
register
- Specified by:
registerin interfaceConfigurable<WebTarget>
-
register
- Specified by:
registerin interfaceConfigurable<WebTarget>
-
register
- Specified by:
registerin interfaceConfigurable<WebTarget>
-
register
- Specified by:
registerin interfaceConfigurable<WebTarget>
-
register
- Specified by:
registerin interfaceConfigurable<WebTarget>
-
property
- Specified by:
propertyin interfaceConfigurable<WebTarget>
-
getConfiguration
Description copied from interface:InitializableGet a live view of an internal client configuration state of this initializable instance.- Specified by:
getConfigurationin interfaceConfigurable<WebTarget>- Specified by:
getConfigurationin interfaceInitializable<JerseyWebTarget>- Returns:
- configuration live view of the internal configuration state.
-
preInitialize
Description copied from interface:InitializablePre-initializes the runtime and runtimeconfigurationof this component in order to improve performance during the first request.Once this method is called no other method implementing
Configurableshould be called on this pre initialized component, otherwise the initialized client runtime will be discarded and the configuration will change back to uninitialized.- Specified by:
preInitializein interfaceInitializable<JerseyWebTarget>- Returns:
- pre-initialized Jersey client component.
-
toString
-