Package ucar.httpservices
Class HTTPFactory
- java.lang.Object
-
- ucar.httpservices.HTTPFactory
-
public class HTTPFactory extends Object
HTTPFactory creates method instance. This code was originally in HttpMethod.
-
-
Field Summary
Fields Modifier and Type Field Description static Class
MOCKMETHODCLASS
-
Constructor Summary
Constructors Constructor Description HTTPFactory()
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static HTTPMethod
Get(String legalurl)
static HTTPMethod
Get(HTTPSession session)
static HTTPMethod
Get(HTTPSession session, String legalurl)
static Set<String>
getAllowedMethods()
static HTTPMethod
Head(String legalurl)
static HTTPMethod
Head(HTTPSession session)
static HTTPMethod
Head(HTTPSession session, String legalurl)
protected static HTTPMethod
makemethod(HTTPSession.Methods m, HTTPSession session, String url)
Common method creation code so we can isolate mockingstatic HTTPSession
newSession(String url)
static HTTPSession
newSession(String host, int port)
static HTTPSession
newSession(org.apache.http.auth.AuthScope scope)
Deprecated.static HTTPSession
newSession(org.apache.http.HttpHost target)
static HTTPMethod
Options(String legalurl)
static HTTPMethod
Options(HTTPSession session)
static HTTPMethod
Options(HTTPSession session, String legalurl)
static HTTPMethod
Post(String legalurl)
static HTTPMethod
Post(HTTPSession session)
static HTTPMethod
Post(HTTPSession session, String legalurl)
static HTTPMethod
Put(String legalurl)
static HTTPMethod
Put(HTTPSession session)
static HTTPMethod
Put(HTTPSession session, String legalurl)
-
-
-
Field Detail
-
MOCKMETHODCLASS
public static Class MOCKMETHODCLASS
-
-
Method Detail
-
newSession
public static HTTPSession newSession(String host, int port) throws HTTPException
- Throws:
HTTPException
-
newSession
public static HTTPSession newSession(String url) throws HTTPException
- Throws:
HTTPException
-
newSession
public static HTTPSession newSession(org.apache.http.HttpHost target) throws HTTPException
- Throws:
HTTPException
-
newSession
@Deprecated public static HTTPSession newSession(org.apache.http.auth.AuthScope scope) throws HTTPException
Deprecated.- Throws:
HTTPException
-
Get
public static HTTPMethod Get(HTTPSession session, String legalurl) throws HTTPException
- Throws:
HTTPException
-
Head
public static HTTPMethod Head(HTTPSession session, String legalurl) throws HTTPException
- Throws:
HTTPException
-
Put
public static HTTPMethod Put(HTTPSession session, String legalurl) throws HTTPException
- Throws:
HTTPException
-
Post
public static HTTPMethod Post(HTTPSession session, String legalurl) throws HTTPException
- Throws:
HTTPException
-
Options
public static HTTPMethod Options(HTTPSession session, String legalurl) throws HTTPException
- Throws:
HTTPException
-
Get
public static HTTPMethod Get(HTTPSession session) throws HTTPException
- Throws:
HTTPException
-
Head
public static HTTPMethod Head(HTTPSession session) throws HTTPException
- Throws:
HTTPException
-
Put
public static HTTPMethod Put(HTTPSession session) throws HTTPException
- Throws:
HTTPException
-
Post
public static HTTPMethod Post(HTTPSession session) throws HTTPException
- Throws:
HTTPException
-
Options
public static HTTPMethod Options(HTTPSession session) throws HTTPException
- Throws:
HTTPException
-
Get
public static HTTPMethod Get(String legalurl) throws HTTPException
- Throws:
HTTPException
-
Head
public static HTTPMethod Head(String legalurl) throws HTTPException
- Throws:
HTTPException
-
Put
public static HTTPMethod Put(String legalurl) throws HTTPException
- Throws:
HTTPException
-
Post
public static HTTPMethod Post(String legalurl) throws HTTPException
- Throws:
HTTPException
-
Options
public static HTTPMethod Options(String legalurl) throws HTTPException
- Throws:
HTTPException
-
makemethod
protected static HTTPMethod makemethod(HTTPSession.Methods m, HTTPSession session, String url) throws HTTPException
Common method creation code so we can isolate mocking- Throws:
HTTPException
-
-