public final class JFPServerMain extends Object implements Runnable, JFPServerControlType
Modifier and Type | Method and Description |
---|---|
static void |
main(String[] args)
Main function.
|
static JFPServerMain |
newServer(JFPServerConfigType c)
Create a new server with the given config.
|
static JFPServerMain |
newServerWithEvents(JFPServerConfigType c,
JFPServerEventsType in_events)
Create a new server with the given config, calling the given function
when the server has started.
|
static JFPServerMain |
newServerWithEventsAndDatabase(JFPServerConfigType c,
JFPAllDatabaseType in_database,
JFPServerEventsType in_events)
Create a new server with the given config, calling the given function
when the server has started.
|
void |
run() |
void |
stop()
Request that the server stop executing.
|
public static void main(String[] args)
args
- Command line arguments.public static JFPServerMain newServer(JFPServerConfigType c) throws JFPException, IOException
c
- The config.IOException
- On I/O errors.JFPException
- On errors.public static JFPServerMain newServerWithEvents(JFPServerConfigType c, JFPServerEventsType in_events) throws IOException, JFPException
c
- The config.in_events
- An events interface to call when various events occur on the
server.IOException
- On I/O errors.JFPException
- On errors.public static JFPServerMain newServerWithEventsAndDatabase(JFPServerConfigType c, JFPAllDatabaseType in_database, JFPServerEventsType in_events) throws IOException, JFPException
c
- The config.in_database
- The database.in_events
- An events interface to call when various events occur on the
server.IOException
- On I/O errors.JFPException
- On errors.public void stop()
JFPServerControlType
stop
in interface JFPServerControlType
Copyright © 2015 <code@io7m.com> http://io7m.com