Class HttpBindManager

    • Method Detail

      • start

        public void start()
      • stop

        public void stop()
      • isHttpBindEnabled

        public boolean isHttpBindEnabled()
        Returns true if the HTTP binding server is currently enabled.
        Returns:
        true if the HTTP binding server is currently enabled.
      • isHttpBindActive

        public boolean isHttpBindActive()
        Returns true if a listener on the HTTP binding port is running.
        Returns:
        true if a listener on the HTTP binding port is running.
      • isHttpsBindActive

        public boolean isHttpsBindActive()
        Returns true if a listener on the HTTPS binding port is running.
        Returns:
        true if a listener on the HTTPS binding port is running.
      • getHttpBindUnsecureAddress

        public String getHttpBindUnsecureAddress()
      • getHttpBindSecureAddress

        public String getHttpBindSecureAddress()
      • getJavaScriptUrl

        public String getJavaScriptUrl()
      • isCORSEnabled

        public boolean isCORSEnabled()
      • setCORSEnabled

        public void setCORSEnabled​(Boolean value)
      • getCORSAllowOrigin

        public String getCORSAllowOrigin()
      • setCORSAllowOrigin

        public void setCORSAllowOrigin​(String origins)
      • isAllOriginsAllowed

        public boolean isAllOriginsAllowed()
      • isThisOriginAllowed

        public boolean isThisOriginAllowed​(String origin)
      • isXFFEnabled

        public boolean isXFFEnabled()
      • setXFFEnabled

        public void setXFFEnabled​(boolean enabled)
      • getXFFHeader

        public String getXFFHeader()
      • setXFFHeader

        public void setXFFHeader​(String header)
      • getXFFServerHeader

        public String getXFFServerHeader()
      • setXFFServerHeader

        public void setXFFServerHeader​(String header)
      • getXFFHostHeader

        public String getXFFHostHeader()
      • setXFFHostHeader

        public void setXFFHostHeader​(String header)
      • getXFFHostName

        public String getXFFHostName()
      • setXFFHostName

        public void setXFFHostName​(String name)
      • setHttpBindEnabled

        public void setHttpBindEnabled​(boolean isEnabled)
      • setHttpBindPorts

        public void setHttpBindPorts​(int unsecurePort,
                                     int securePort)
                              throws Exception
        Set the ports on which the HTTP binding service will be running.
        Parameters:
        unsecurePort - the unsecured connection port which clients can connect to.
        securePort - the secured connection port which clients can connect to.
        Throws:
        Exception - when there is an error configuring the HTTP binding ports.
      • createBoshHandler

        protected org.eclipse.jetty.server.Handler createBoshHandler()
        Creates a Jetty context handler that can be used to expose BOSH (HTTP-Bind) functionality. 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.
        Returns:
        A Jetty context handler (never null).
      • createWebsocketHandler

        protected org.eclipse.jetty.server.Handler createWebsocketHandler()
        Creates a Jetty context handler that can be used to expose Websocket functionality. 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.
        Returns:
        A Jetty context handler (never null).
      • createCrossDomainHandler

        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. 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.
        Returns:
        A Jetty context handler (never null).
      • createStaticContentHandler

        protected org.eclipse.jetty.server.Handler createStaticContentHandler()
        Creates a Jetty context handler that can be used to expose static files. 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.
        Returns:
        A Jetty context handler, or null when the static content could not be accessed.
      • addJettyHandler

        public 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.
        Parameters:
        handler - The handler (cannot be null).
      • removeJettyHandler

        public 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. Removing a handler, even when null, or non-existing, might have side-effects as introduced by the Jetty implementation. At the time of writing, Jetty will re
        Parameters:
        handler - The handler (should not be null).
      • getHttpBindUnsecurePort

        public int getHttpBindUnsecurePort()
        Returns the HTTP binding port which does not use SSL.
        Returns:
        the HTTP binding port which does not use SSL.
      • getHttpBindSecurePort

        public int getHttpBindSecurePort()
        Returns the HTTP binding port which uses SSL.
        Returns:
        the HTTP binding port which uses SSL.
      • isScriptSyntaxEnabled

        public boolean isScriptSyntaxEnabled()
        Returns true if script syntax is enabled. Script syntax allows BOSH to be used in environments where clients may be restricted to using a particular server. Instead of using standard HTTP Post requests to transmit data, HTTP Get requests are used.
        Returns:
        true if script syntax is enabled.
        See Also:
        BOSH: Alternative Script Syntax
      • propertySet

        public void propertySet​(String property,
                                Map<String,​Object> params)
        Description copied from interface: PropertyEventListener
        A property was set. The parameter map params will contain the the value of the property under the key value.
        Specified by:
        propertySet in interface PropertyEventListener
        Parameters:
        property - the name of the property.
        params - event parameters.
      • xmlPropertySet

        public void xmlPropertySet​(String property,
                                   Map<String,​Object> params)
        Description copied from interface: PropertyEventListener
        An XML property was set. The parameter map params will contain the the value of the property under the key value.
        Specified by:
        xmlPropertySet in interface PropertyEventListener
        Parameters:
        property - the name of the property.
        params - event parameters.