public class RemoteServerManager extends Object
Modifier and Type | Class and Description |
---|---|
static class |
RemoteServerManager.PermissionPolicy |
Constructor and Description |
---|
RemoteServerManager() |
Modifier and Type | Method and Description |
---|---|
static void |
allowAccess(RemoteServerConfiguration configuration)
Allows a remote server to connect to the local server with the specified configuration.
|
static void |
blockAccess(String domain)
Blocks a remote server from connecting to the local server.
|
static boolean |
canAccess(String domain)
Returns true if the remote server with the specified domain can connect to the
local server.
|
static void |
deleteConfiguration(String domain)
Removes any existing defined permission and configuration for the specified
remote server.
|
static Collection<RemoteServerConfiguration> |
getAllowedServers()
Returns the list of registered remote servers that are allowed to connect to/from this
server when using a whitelist policy.
|
static Collection<RemoteServerConfiguration> |
getBlockedServers()
Returns the list of remote servers that are NOT allowed to connect to/from this
server.
|
static RemoteServerConfiguration |
getConfiguration(String domain)
Returns the configuration for a remote server or
null if none was found. |
static RemoteServerManager.PermissionPolicy |
getPermissionPolicy()
Returns the permission policy being used for new XMPP entities that are trying to
connect to the server.
|
static int |
getPortForServer(String domain)
Returns the remote port to connect for the specified remote server.
|
static int |
getSocketTimeout()
Returns the number of milliseconds to wait to connect to a remote server or read
data from a remote server.
|
static void |
setPermissionPolicy(RemoteServerManager.PermissionPolicy policy)
Sets the permission policy being used for new XMPP entities that are trying to
connect to the server.
|
static void |
setPermissionPolicy(String policy)
Sets the permission policy being used for new XMPP entities that are trying to
connect to the server.
|
public static void allowAccess(RemoteServerConfiguration configuration)
configuration
- the configuration for the remote server.public static void blockAccess(String domain)
domain
- the domain of the remote server that is not allowed to connect.public static boolean canAccess(String domain)
domain
- the domain of the remote server.public static Collection<RemoteServerConfiguration> getAllowedServers()
public static Collection<RemoteServerConfiguration> getBlockedServers()
public static int getSocketTimeout()
xmpp.server.read.timeout
global property to override the default value.public static void deleteConfiguration(String domain)
domain
- the domain of the remote server.public static RemoteServerConfiguration getConfiguration(String domain)
null
if none was found.domain
- the domain of the remote server.null
if none was found.public static int getPortForServer(String domain)
domain
- the domain of the remote server to get the remote port to connect to.public static RemoteServerManager.PermissionPolicy getPermissionPolicy()
public static void setPermissionPolicy(RemoteServerManager.PermissionPolicy policy)
policy
- the new PermissionPolicy to use.public static void setPermissionPolicy(String policy)
policy
- the new policy to use.Copyright © 2003–2020 Ignite Realtime. All rights reserved.