public class UgiJerseyBinding extends Object implements com.sun.jersey.client.urlconnection.HttpURLConnectionFactory
Usage: create an instance, then when creating a Jersey Client
pass in to the constructor the handler provided by getHandler()
see Jersey docs
| Constructor and Description |
|---|
UgiJerseyBinding(org.apache.hadoop.conf.Configuration conf)
Create an instance off the configuration.
|
UgiJerseyBinding(UrlConnectionOperations operations)
Construct an instance
|
| Modifier and Type | Method and Description |
|---|---|
com.sun.jersey.api.client.Client |
createJerseyClient()
Create a jersey client bonded to this handler, using the
client config created with
createJerseyClientConfig() |
com.sun.jersey.api.client.Client |
createJerseyClient(com.sun.jersey.api.client.config.ClientConfig clientConfig)
Create a jersey client bonded to this handler, using the
supplied client config
|
com.sun.jersey.api.client.config.ClientConfig |
createJerseyClientConfig()
Create the standard Jersey client Config
|
com.sun.jersey.client.urlconnection.URLConnectionClientHandler |
getHandler() |
HttpURLConnection |
getHttpURLConnection(URL url)
Get a URL connection.
|
UrlConnectionOperations |
getOperations() |
boolean |
isUseSpnego()
Get the SPNEGO flag (as found in the operations instance
|
static IOException |
uprateFaults(HttpVerb verb,
String url,
com.sun.jersey.api.client.UniformInterfaceException ex)
Uprate error codes 400 and up into faults;
|
public UgiJerseyBinding(UrlConnectionOperations operations)
operations - operations instancepublic UgiJerseyBinding(org.apache.hadoop.conf.Configuration conf)
conf - configpublic HttpURLConnection getHttpURLConnection(URL url) throws IOException
getHttpURLConnection in interface com.sun.jersey.client.urlconnection.HttpURLConnectionFactoryurl - URL to connect toIOException - any problem. AuthenticationException
errors are wrappedpublic UrlConnectionOperations getOperations()
public com.sun.jersey.client.urlconnection.URLConnectionClientHandler getHandler()
public boolean isUseSpnego()
public static IOException uprateFaults(HttpVerb verb, String url, com.sun.jersey.api.client.UniformInterfaceException ex) throws IOException
see ExceptionConverter.convertJerseyException(String, String, UniformInterfaceException)
IOExceptionpublic com.sun.jersey.api.client.config.ClientConfig createJerseyClientConfig()
public com.sun.jersey.api.client.Client createJerseyClient(com.sun.jersey.api.client.config.ClientConfig clientConfig)
clientConfig - client configuratinpublic com.sun.jersey.api.client.Client createJerseyClient()
createJerseyClientConfig()Copyright © 2014–2015 The Apache Software Foundation. All rights reserved.