|
Connection Manager 3.4.2 Javadoc | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jivesoftware.multiplexer.ConnectionManager
public class ConnectionManager
Connection managers handle connections of clients that want to connect to a server. Each connection manager may have one or more connections to the target server. These connections are shared amongst connected clients (i.e. multiplexed) thus reducing the load on the server.
The only properties that needs to be configured during Connection Managers' setup are xmpp.domain and xmpp.password. The xmpp.domain property defines the name of the target server that clients want to connect to. Clients are redirected to a connection manager when trying to open a socket connection to the server. This is typically done by configuring some local DNS server with a SRV record for the server name that points to the connection manager address. More elaborated solutions may include a load balancer in front of several connection managers. Since XMPP connections are state-full and long-lived then the load balancer does not have to be configured with "sticky sessions".
The server and connection managers have to share a common secret so that the server can let connection managers connect to the server and forward packets. Configure the xmpp.password property with the same password to log into the server.
Each connection manager has to have a unique name that uniquely identifies it from other connection managers. Use the property xmpp.manager.name to manually set a name. If this property is not present then a random name will be created for the manager each time it is started. Properties are stored in conf/manager.xml. There are several ways for locating this file.
Field Summary | |
---|---|
protected java.lang.ClassLoader |
loader
|
protected java.lang.String |
name
Name of the connection manager. |
protected java.lang.String |
serverName
Name of the server to connect. |
protected java.util.Date |
startDate
|
protected java.util.Date |
stopDate
|
protected Version |
version
|
Constructor Summary | |
---|---|
ConnectionManager()
Creates a server and starts it. |
Method Summary | |
---|---|
void |
finishSetup()
Finish the setup process. |
static ConnectionManager |
getInstance()
Returns a singleton instance of ConnectionManager. |
java.lang.String |
getName()
Returns the name that uniquely identifies this connection manager. |
java.lang.String |
getServerName()
Returns the name of the main server where received packets will be forwarded. |
ServerSurrogate |
getServerSurrogate()
Returns the service responsible for forwarding stanzas to the server. |
protected void |
initialize()
|
boolean |
isRestartable()
|
boolean |
isSetupMode()
|
boolean |
isStandAlone()
Returns if the server is running in standalone mode. |
void |
restart()
Restarts the server and all it's modules only if the server is restartable. |
void |
start()
|
void |
stop()
Stops the server only if running in standalone mode. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.lang.String name
protected java.lang.String serverName
protected Version version
protected java.util.Date startDate
protected java.util.Date stopDate
protected java.lang.ClassLoader loader
Constructor Detail |
---|
public ConnectionManager()
Method Detail |
---|
public static ConnectionManager getInstance()
protected void initialize() throws java.io.FileNotFoundException
java.io.FileNotFoundException
public void finishSetup()
public void start()
public void restart()
public void stop()
public boolean isSetupMode()
public boolean isRestartable()
public boolean isStandAlone()
public ServerSurrogate getServerSurrogate()
public java.lang.String getServerName()
public java.lang.String getName()
|
Connection Manager 3.4.2 Javadoc | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |