Class WebServiceClient
java.lang.Object
org.apache.hadoop.yarn.webapp.util.WebServiceClient
Utility for handling Web client.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionjavax.ws.rs.client.ClientCreate a client based on http conf.static voiddestroy()protected org.glassfish.jersey.client.HttpUrlConnectorProviderstatic WebServiceClientstatic voidinitialize(org.apache.hadoop.conf.Configuration conf) Construct a new WebServiceClient based on the configuration.
-
Constructor Details
-
WebServiceClient
public WebServiceClient()
-
-
Method Details
-
initialize
Construct a new WebServiceClient based on the configuration. It will try to load SSL certificates when it is specified.- Parameters:
conf- configuration.- Throws:
Exception- exception occur.
-
getWebServiceClient
-
createClient
public javax.ws.rs.client.Client createClient()Create a client based on http conf.- Returns:
- Client
-
getHttpURLConnectionFactory
@VisibleForTesting protected org.glassfish.jersey.client.HttpUrlConnectorProvider getHttpURLConnectionFactory() -
destroy
public static void destroy()
-