public class OpenPolicyResourceHandler extends Object implements HttpServer.Handler
| Constructor and Description |
|---|
OpenPolicyResourceHandler(String policyPath,
ServerResource policyResource,
OriginAuthorizer authorizer)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
static HttpServer.Handler |
createFlashPolicyHandler(OriginAuthorizer oAuth)
Returns a handler which can serve the /crossdomain.xml file
used by Adobe Flash.
|
static HttpServer.Handler |
createPolicyHandler(String path,
URL contentUrl,
String contentType,
OriginAuthorizer oAuth)
Creates a handler suitable for serving static cross-origin policy files.
|
static HttpServer.Handler |
createSilverlightPolicyHandler(OriginAuthorizer oAuth)
Returns a handler which can serve the /clientaccesspolicy.xml file
used by Microsoft Silverlight.
|
HttpServer.Response |
serveRequest(HttpServer.Request request)
Provides a response to an HTTP request.
|
public OpenPolicyResourceHandler(String policyPath, ServerResource policyResource, OriginAuthorizer authorizer)
policyPath - path at which the policy file will reside on
this handler's serverpolicyResource - content of policy fileauthorizer - controls who is permitted to view the policy filepublic HttpServer.Response serveRequest(HttpServer.Request request)
HttpServer.HandlerserveRequest in interface HttpServer.Handlerrequest - HTTP requestpublic static HttpServer.Handler createPolicyHandler(String path, URL contentUrl, String contentType, OriginAuthorizer oAuth) throws IOException
path - path at which the policy file will reside on the
handler's HTTP servercontentUrl - external URL at which the resource contents
can be found; this will be retrieved once and
cachedoAuth - controls who is permitted to retrieve the policy fileIOExceptionpublic static HttpServer.Handler createFlashPolicyHandler(OriginAuthorizer oAuth) throws IOException
oAuth - controls who is permitted to retrieve the policy fileIOExceptionpublic static HttpServer.Handler createSilverlightPolicyHandler(OriginAuthorizer oAuth) throws IOException
oAuth - controls who is permitted to retrieve the policy fileIOExceptionCopyright © 2008–2024. All rights reserved.