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 ClassMOCKMETHODCLASS
-
Constructor Summary
Constructors Constructor Description HTTPFactory()
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static HTTPMethodGet(String legalurl)static HTTPMethodGet(HTTPSession session)static HTTPMethodGet(HTTPSession session, String legalurl)static Set<String>getAllowedMethods()static HTTPMethodHead(String legalurl)static HTTPMethodHead(HTTPSession session)static HTTPMethodHead(HTTPSession session, String legalurl)protected static HTTPMethodmakemethod(HTTPSession.Methods m, HTTPSession session, String url)Common method creation code so we can isolate mockingstatic HTTPSessionnewSession(String url)static HTTPSessionnewSession(String host, int port)static HTTPSessionnewSession(org.apache.http.auth.AuthScope scope)Deprecated.static HTTPSessionnewSession(org.apache.http.HttpHost target)static HTTPMethodOptions(String legalurl)static HTTPMethodOptions(HTTPSession session)static HTTPMethodOptions(HTTPSession session, String legalurl)static HTTPMethodPost(String legalurl)static HTTPMethodPost(HTTPSession session)static HTTPMethodPost(HTTPSession session, String legalurl)static HTTPMethodPut(String legalurl)static HTTPMethodPut(HTTPSession session)static HTTPMethodPut(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
-
-