public final class HttpBindManager extends Object implements CertificateEventListener, PropertyEventListener
Modifier and Type | Field and Description |
---|---|
static Map<String,Boolean> |
HTTP_BIND_ALLOWED_ORIGINS |
static String |
HTTP_BIND_AUTH_PER_CLIENTCERT_POLICY |
static String |
HTTP_BIND_CORS_ALLOW_HEADERS_DEFAULT |
static String |
HTTP_BIND_CORS_ALLOW_METHODS_DEFAULT |
static String |
HTTP_BIND_CORS_ALLOW_ORIGIN |
static String |
HTTP_BIND_CORS_ALLOW_ORIGIN_DEFAULT |
static String |
HTTP_BIND_CORS_ENABLED |
static boolean |
HTTP_BIND_CORS_ENABLED_DEFAULT |
static String |
HTTP_BIND_CORS_MAX_AGE_DEFAULT |
static String |
HTTP_BIND_ENABLED |
static boolean |
HTTP_BIND_ENABLED_DEFAULT |
static String |
HTTP_BIND_PORT |
static int |
HTTP_BIND_PORT_DEFAULT |
static String |
HTTP_BIND_REQUEST_HEADER_SIZE |
static int |
HTTP_BIND_REQUEST_HEADER_SIZE_DEFAULT |
static String |
HTTP_BIND_SECURE_PORT |
static int |
HTTP_BIND_SECURE_PORT_DEFAULT |
static String |
HTTP_BIND_THREADS |
static int |
HTTP_BIND_THREADS_DEFAULT |
Modifier and Type | Method and Description |
---|---|
void |
addJettyHandler(org.eclipse.jetty.server.Handler handler)
Adds a Jetty handler to be added to the embedded web server that is used to expose BOSH (HTTP-bind)
functionality.
|
void |
certificateCreated(KeyStore keyStore,
String alias,
X509Certificate cert)
Event triggered when a new certificate is created.
|
void |
certificateDeleted(KeyStore keyStore,
String alias)
Event triggered when a certificate is being deleted from the keystore.
|
void |
certificateSigned(KeyStore keyStore,
String alias,
List<X509Certificate> certificates)
Event triggered when a certificate has been signed by a Certificate Authority.
|
protected org.eclipse.jetty.server.Handler |
createBoshHandler()
Creates a Jetty context handler that can be used to expose BOSH (HTTP-Bind) functionality.
|
protected org.eclipse.jetty.server.Handler |
createCrossDomainHandler()
Creates a Jetty context handler that can be used to expose the cross-domain functionality as implemented by
FlashCrossDomainServlet . |
protected org.eclipse.jetty.server.Handler |
createStaticContentHandler()
Creates a Jetty context handler that can be used to expose static files.
|
String |
getCORSAllowOrigin() |
String |
getHttpBindSecureAddress() |
int |
getHttpBindSecurePort()
Returns the HTTP binding port which uses SSL.
|
String |
getHttpBindUnsecureAddress() |
int |
getHttpBindUnsecurePort()
Returns the HTTP binding port which does not use SSL.
|
static HttpBindManager |
getInstance() |
String |
getJavaScriptUrl() |
HttpSessionManager |
getSessionManager() |
String |
getXFFHeader() |
String |
getXFFHostHeader() |
String |
getXFFHostName() |
String |
getXFFServerHeader() |
boolean |
isAllOriginsAllowed() |
boolean |
isCORSEnabled() |
boolean |
isHttpBindActive()
Returns true if a listener on the HTTP binding port is running.
|
boolean |
isHttpBindEnabled()
Returns true if the HTTP binding server is currently enabled.
|
boolean |
isHttpsBindActive()
Returns true if a listener on the HTTPS binding port is running.
|
boolean |
isScriptSyntaxEnabled()
Returns true if script syntax is enabled.
|
boolean |
isThisOriginAllowed(String origin) |
boolean |
isXFFEnabled() |
void |
propertyDeleted(String property,
Map<String,Object> params)
A property was deleted.
|
void |
propertySet(String property,
Map<String,Object> params)
A property was set.
|
void |
removeJettyHandler(org.eclipse.jetty.server.Handler handler)
Removes a Jetty handler to be added to the embedded web server that is used to expose BOSH (HTTP-bind)
functionality.
|
void |
setCORSAllowOrigin(String origins) |
void |
setCORSEnabled(Boolean value) |
void |
setHttpBindEnabled(boolean isEnabled) |
void |
setHttpBindPorts(int unsecurePort,
int securePort)
Set the ports on which the HTTP binding service will be running.
|
void |
setScriptSyntaxEnabled(boolean isEnabled)
Enables or disables script syntax.
|
void |
setXFFEnabled(boolean enabled) |
void |
setXFFHeader(String header) |
void |
setXFFHostHeader(String header) |
void |
setXFFHostName(String name) |
void |
setXFFServerHeader(String header) |
void |
start() |
void |
stop() |
void |
xmlPropertyDeleted(String property,
Map<String,Object> params)
An XML property was deleted.
|
void |
xmlPropertySet(String property,
Map<String,Object> params)
An XML property was set.
|
public static final String HTTP_BIND_ENABLED
public static final boolean HTTP_BIND_ENABLED_DEFAULT
public static final String HTTP_BIND_PORT
public static final int HTTP_BIND_PORT_DEFAULT
public static final String HTTP_BIND_SECURE_PORT
public static final int HTTP_BIND_SECURE_PORT_DEFAULT
public static final String HTTP_BIND_THREADS
public static final String HTTP_BIND_AUTH_PER_CLIENTCERT_POLICY
public static final int HTTP_BIND_THREADS_DEFAULT
public static final String HTTP_BIND_CORS_ENABLED
public static final boolean HTTP_BIND_CORS_ENABLED_DEFAULT
public static final String HTTP_BIND_CORS_ALLOW_ORIGIN
public static final String HTTP_BIND_CORS_ALLOW_ORIGIN_DEFAULT
public static final String HTTP_BIND_CORS_ALLOW_METHODS_DEFAULT
public static final String HTTP_BIND_CORS_ALLOW_HEADERS_DEFAULT
public static final String HTTP_BIND_CORS_MAX_AGE_DEFAULT
public static final String HTTP_BIND_REQUEST_HEADER_SIZE
public static final int HTTP_BIND_REQUEST_HEADER_SIZE_DEFAULT
public static HttpBindManager getInstance()
public void start()
public void stop()
public HttpSessionManager getSessionManager()
public boolean isHttpBindEnabled()
public boolean isHttpBindActive()
public boolean isHttpsBindActive()
public String getHttpBindUnsecureAddress()
public String getHttpBindSecureAddress()
public String getJavaScriptUrl()
public boolean isCORSEnabled()
public void setCORSEnabled(Boolean value)
public String getCORSAllowOrigin()
public void setCORSAllowOrigin(String origins)
public boolean isAllOriginsAllowed()
public boolean isThisOriginAllowed(String origin)
public boolean isXFFEnabled()
public void setXFFEnabled(boolean enabled)
public String getXFFHeader()
public void setXFFHeader(String header)
public String getXFFServerHeader()
public void setXFFServerHeader(String header)
public String getXFFHostHeader()
public void setXFFHostHeader(String header)
public String getXFFHostName()
public void setXFFHostName(String name)
public void setHttpBindEnabled(boolean isEnabled)
public void setHttpBindPorts(int unsecurePort, int securePort) throws Exception
unsecurePort
- the unsecured connection port which clients can connect to.securePort
- the secured connection port which clients can connect to.Exception
- when there is an error configuring the HTTP binding ports.protected org.eclipse.jetty.server.Handler createBoshHandler()
protected org.eclipse.jetty.server.Handler createCrossDomainHandler()
FlashCrossDomainServlet
.
Note that an invocation of this method will not register the handler (and thus make the related functionality
available to the end user). Instead, the created handler is returned by this method, and will need to be
registered with the embedded Jetty webserver by the caller.protected org.eclipse.jetty.server.Handler createStaticContentHandler()
public void addJettyHandler(org.eclipse.jetty.server.Handler handler)
handler
- The handler (cannot be null).public void removeJettyHandler(org.eclipse.jetty.server.Handler handler)
handler
- The handler (should not be null).public int getHttpBindUnsecurePort()
public int getHttpBindSecurePort()
public boolean isScriptSyntaxEnabled()
public void setScriptSyntaxEnabled(boolean isEnabled)
isEnabled
- true to enable script syntax and false to disable it.isScriptSyntaxEnabled()
,
BOSH: Alternative Script
Syntaxpublic void propertySet(String property, Map<String,Object> params)
PropertyEventListener
propertySet
in interface PropertyEventListener
property
- the name of the property.params
- event parameters.public void propertyDeleted(String property, Map<String,Object> params)
PropertyEventListener
propertyDeleted
in interface PropertyEventListener
property
- the name of the property deleted.params
- event parameters.public void xmlPropertySet(String property, Map<String,Object> params)
PropertyEventListener
xmlPropertySet
in interface PropertyEventListener
property
- the name of the property.params
- event parameters.public void xmlPropertyDeleted(String property, Map<String,Object> params)
PropertyEventListener
xmlPropertyDeleted
in interface PropertyEventListener
property
- the name of the property.params
- event parameters.public void certificateCreated(KeyStore keyStore, String alias, X509Certificate cert)
CertificateEventListener
certificateCreated
in interface CertificateEventListener
keyStore
- key store where the certificate has been added.alias
- the alias of the certificate in the keystore.cert
- the new certificate created.public void certificateDeleted(KeyStore keyStore, String alias)
CertificateEventListener
certificateDeleted
in interface CertificateEventListener
keyStore
- key store where the certificate is being deleted.alias
- the alias of the certificate in the keystore.public void certificateSigned(KeyStore keyStore, String alias, List<X509Certificate> certificates)
CertificateEventListener
certificateSigned
in interface CertificateEventListener
keyStore
- key store where the certificate is stored.alias
- the alias of the certificate in the keystore.certificates
- chain of certificates. First certificate in the list is the certificate
being signed and last certificate in the list is the root certificate.Copyright © 2003-2008 Jive Software.