|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.openxri.proxy.impl.BasicProxy
public class BasicProxy
Provides a servlet implementation for the XRI resolution protocol
Nested Class Summary | |
---|---|
protected class |
BasicProxy.QueryParams
|
Field Summary | |
---|---|
static java.lang.String |
_XRD_M
|
static java.lang.String |
_XRD_R
|
static java.lang.String |
_XRD_T
|
protected java.lang.String |
bareXRINotFoundRedirect
|
protected ProxyConfig |
config
|
static java.lang.String |
HTTP_ERROR_CONTENT_TYPE
|
static java.lang.String |
HTTP_XML_CONTENT_TYPE
|
protected static org.apache.commons.logging.Log |
log
Static Logging object that can be used by derived classes |
static java.lang.String |
PARAM_URIC
|
protected Resolver |
resolver
The XRI resolver object for the server. |
protected java.lang.String |
rootRedirect
|
protected boolean |
supportRedirect
|
protected boolean |
supportURIList
|
protected boolean |
supportXRD
|
protected boolean |
supportXRDS
|
Constructor Summary | |
---|---|
BasicProxy(ProxyConfig config)
|
Method Summary | |
---|---|
protected java.lang.String |
buildAbsoluteURL(javax.servlet.http.HttpServletRequest request,
java.lang.String relPath)
|
void |
init()
|
protected BasicProxy.QueryParams |
parseQuery(javax.servlet.http.HttpServletRequest req)
|
void |
process(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Service an incoming request. |
protected void |
send301(javax.servlet.http.HttpServletResponse response,
java.lang.String location)
Send a 301 HTTP redirect to the client. |
protected void |
send303(javax.servlet.http.HttpServletResponse response,
java.lang.String location)
Send a 303 HTTP redirect to the client. |
protected void |
sendFatalError(javax.servlet.http.HttpServletResponse resp,
java.lang.String errorMessage)
This method is called when an unknown error is encountered. |
protected void |
sendPartialResponse(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
java.lang.String qxri,
boolean isDebug,
MimeType resMediaType,
XRDS partialXRDS,
TrustType trustType)
|
protected void |
sendResponse(javax.servlet.http.HttpServletResponse response,
boolean isDebug,
java.lang.String contentType,
java.lang.String result,
TrustType trustType)
Send a HTTP response to the client. |
protected void |
sendResponse(javax.servlet.http.HttpServletResponse response,
int statusCode,
java.lang.String contentType,
java.lang.String result,
TrustType trustType)
Send a HTTP response with the specified status code to the client. |
protected void |
sendResponse(javax.servlet.http.HttpServletResponse response,
java.lang.String contentType,
java.lang.String result,
TrustType trustType)
Send a HTTP response to the client. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected ProxyConfig config
protected static org.apache.commons.logging.Log log
public static final java.lang.String _XRD_R
public static final java.lang.String _XRD_T
public static final java.lang.String _XRD_M
public static final java.lang.String HTTP_ERROR_CONTENT_TYPE
public static final java.lang.String HTTP_XML_CONTENT_TYPE
public static final java.lang.String PARAM_URIC
protected boolean supportXRDS
protected boolean supportXRD
protected boolean supportURIList
protected boolean supportRedirect
protected java.lang.String rootRedirect
protected java.lang.String bareXRINotFoundRedirect
protected Resolver resolver
Constructor Detail |
---|
public BasicProxy(ProxyConfig config)
Method Detail |
---|
public void init() throws ProxyException
init
in interface Proxy
ProxyException
public void process(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
process
in interface Proxy
protected java.lang.String buildAbsoluteURL(javax.servlet.http.HttpServletRequest request, java.lang.String relPath)
protected void sendFatalError(javax.servlet.http.HttpServletResponse resp, java.lang.String errorMessage)
resp
- errorMessage
- protected void sendPartialResponse(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, java.lang.String qxri, boolean isDebug, MimeType resMediaType, XRDS partialXRDS, TrustType trustType) throws java.io.IOException
java.io.IOException
protected void send301(javax.servlet.http.HttpServletResponse response, java.lang.String location) throws java.io.IOException
java.io.IOException
protected void send303(javax.servlet.http.HttpServletResponse response, java.lang.String location) throws java.io.IOException
java.io.IOException
protected void sendResponse(javax.servlet.http.HttpServletResponse response, boolean isDebug, java.lang.String contentType, java.lang.String result, TrustType trustType) throws java.io.IOException
isDebug
- flag to indicate if the client wants text/xml to be returned
java.io.IOException
protected void sendResponse(javax.servlet.http.HttpServletResponse response, java.lang.String contentType, java.lang.String result, TrustType trustType) throws java.io.IOException
java.io.IOException
protected void sendResponse(javax.servlet.http.HttpServletResponse response, int statusCode, java.lang.String contentType, java.lang.String result, TrustType trustType) throws java.io.IOException
response
- statusCode
- contentType
- result
- trustType
-
java.io.IOException
protected BasicProxy.QueryParams parseQuery(javax.servlet.http.HttpServletRequest req)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |