public static final class JabberBuilder.JabberServer extends Object
Constructor and Description |
---|
JabberBuilder.JabberServer() |
Modifier and Type | Method and Description |
---|---|
void |
broadcast(String message)
Sends a broadcast message to all users.
|
static JabberBuilder.JabberServer |
getServer()
Lazy Singleton.
|
boolean |
isRunning()
Checks if the Server is running.
|
void |
start(String certAbsoluteFilename,
String certKey,
String hostname,
String serverPort)
The offical server start with a cascading-fault-barrier around.
|
void |
stop()
Stops the XMPP-Server.
|
public static JabberBuilder.JabberServer getServer()
JabberBuilder.JabberServer
.public void broadcast(String message) throws NullPointerException
Internally synchronize about the users. Because someone may restart the server meanwhile a broadcast is running.
Some lazy programmers missed to specify unchecked-exceptions in method signatures.
message
- The message to broadcast, not null and \n\r as
line-break.NullPointerException
- If the Server stops meanwhile or some other
undocumentated cases.public void start(String certAbsoluteFilename, String certKey, String hostname, String serverPort) throws Exception
certAbsoluteFilename
- The Filename of the .jks-file.certKey
- The key of the .jks-file.hostname
- The Hostname, usually not including subdomains, except
explicits.serverPort
- The Port. In combination with the Hostname, a Socket.Exception
- If some unexpected has been happend.public void stop() throws IllegalStateException
IllegalStateException
public boolean isRunning()
true
if the Server is running.
false
if not.Copyright © 2004-2014. All Rights Reserved.