Module ringo/httpserver/httpserver
A module containing the HttpServer constructor and its more lowlevel methods
See
Class HttpServer
Instance Methods
- addContext(context)
- configure(xmlPath)
- createConnector(connectionFactory, options)
- createHttpConfig(options)
- createHttpConnector(options)
- createHttpListener(options)
- createHttpsConnector(options)
- createHttpsListener(options)
- createSslContextFactory(options)
- enableSessions()
- getConnectionStatistics()
- getContextHandlerCollection()
- getHandlerCollection()
- isRunning()
- serveApplication()
- serveStatic()
Instance Properties
HttpServer.prototype. addContext (context)
Adds a context and starts it
Parameters
Context | context | The context to add |
Returns
Context | The context passed as argument |
HttpServer.prototype. configure (xmlPath)
Configures this instance with the specified jetty.xml configuration file
Parameters
String | xmlPath | The path to the jetty.xml configuration file |
HttpServer.prototype. createConnector (connectionFactory, options)
Creates a new connector
Parameters
o.e.j.s.HttpConnectionFactory | connectionFactory | The connection factory |
Object | options | An object containing the following properties:
|
Returns
org.eclipse.jetty.server.ServerConnector |
HttpServer.prototype. createHttpConfig (options)
Creates a new HttpConfiguration instance
Parameters
Object | options | An object containing the following properties:
|
Returns
org.eclipse.jetty.server.HttpConfiguration |
HttpServer.prototype. createHttpConnector (options)
Creates a new http connector
Parameters
Object | options | An object containing options |
Returns
org.eclipse.jetty.server.ServerConnector |
See
HttpServer.prototype. createHttpListener (options)
Creates a new http listener and adds it to the encapsulated jetty http server
Parameters
Object | options |
Returns
org.eclipse.jetty.server.ServerConnector |
HttpServer.prototype. createHttpsConnector (options)
Creates a new https connector
Parameters
Object | options | An object containing options (in addition to those passed to createSslContextFactory):
|
Returns
org.eclipse.jetty.server.ServerConnector |
HttpServer.prototype. createHttpsListener (options)
Creates a new http listener and adds it to the encapsulated jetty http server
Parameters
Object | options |
Returns
org.eclipse.jetty.server.ServerConnector |
HttpServer.prototype. createSslContextFactory (options)
Creates a new SSL context factory
Parameters
Object | options | An object containing options (in addition to those passed to createConnector):
|
Returns
org.eclipse.jetty.util.ssl.SslContextFactory; |
See
HttpServer.prototype. destroy
Destroys the jetty http server
HttpServer.prototype. enableSessions ()
Enables sessions in the jetty server
Returns
org.eclipse.jetty.server.session.DefaultSessionIdManager |
HttpServer.prototype. getConnectionStatistics ()
Returns the connection statistics of the jetty server
Returns
Object | An object containing connection statistics |
HttpServer.prototype. getContextHandlerCollection ()
Returns the context handler collection of the encapsulated jetty server, instantiating it if it doesn't exist already
Returns
org.eclipse.jetty.server.handler.ContextHandlerCollection | ; |
HttpServer.prototype. getHandlerCollection ()
Returns the handler collection of the encapsulated jetty server, instantiating it if it doesn't exist already
Returns
org.eclipse.jetty.server.handler.HandlerCollection | ; |
HttpServer.prototype. isRunning ()
Returns true if the server is running
Returns
boolean | True if the server is running |
HttpServer.prototype. start
Starts the jetty http server
HttpServer.prototype. stop
Stops the jetty http server