Overview | Package | Class | Tree | Deprecated | Index | Help
| Openfire 3.4.3 Javadoc
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jivesoftware.openfire.server
Class RemoteServerManager

    java.lang.Object
      org.jivesoftware.openfire.server.RemoteServerManager

    public class RemoteServerManager

extends Object

Manages the connection permissions for remote servers. When a remote server is allowed to connect to this server then a special configuration for the remote server will be kept. The configuration holds information such as the port to use when creating an outgoing connection.

Author:
  Gaston Dombiak

Nested Class Summary
`static class` | `RemoteServerManager.PermissionPolicy`

Constructor Summary
`RemoteServerManager()`

Method Summary
`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.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### RemoteServerManager

    public RemoteServerManager()

Method Detail

### allowAccess

    public static void allowAccess(RemoteServerConfiguration configuration)

  Allows a remote server to connect to the local server with the specified configuration.

  Parameters:
    `configuration` - the configuration for the remote server.

### blockAccess

    public static void blockAccess(String domain)

  Blocks a remote server from connecting to the local server. If the remote server was connected when the permission was revoked then the connection of the entity will be closed.

  Parameters:
    `domain` - the domain of the remote server that is not allowed to connect.

### canAccess

    public static boolean canAccess(String domain)

  Returns true if the remote server with the specified domain can connect to the local server.

  Parameters:
    `domain` - the domain of the remote server.
  Returns:
    true if the remote server with the specified domain can connect to the local server.

### getAllowedServers

    public 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. However, when using a blacklist policy (i.e. anyone may connect to the server) the returned list of configurations will be used for obtaining the specific connection configuration for each remote server.

  Returns:
    the configuration of the registered external components.

### getBlockedServers

    public static Collection<RemoteServerConfiguration> getBlockedServers()

  Returns the list of remote servers that are NOT allowed to connect to/from this server.

  Returns:
    the configuration of the blocked external components.

### getSocketTimeout

    public static int getSocketTimeout()

  Returns the number of milliseconds to wait to connect to a remote server or read data from a remote server. Default timeout value is 20 seconds. Configure the `xmpp.server.read.timeout` global property to override the default value.

  Returns:
    the number of milliseconds to wait to connect to a remote server or read data from a remote server.

### deleteConfiguration

    public static void deleteConfiguration(String domain)

  Removes any existing defined permission and configuration for the specified remote server.

  Parameters:
    `domain` - the domain of the remote server.

### getConfiguration

    public static RemoteServerConfiguration getConfiguration(String domain)

  Returns the configuration for a remote server or `null` if none was found.

  Parameters:
    `domain` - the domain of the remote server.
  Returns:
    the configuration for a remote server or `null` if none was found.

### getPortForServer

    public static int getPortForServer(String domain)

  Returns the remote port to connect for the specified remote server. If no port was defined then use the default port (e.g. 5269).

  Parameters:
    `domain` - the domain of the remote server to get the remote port to connect to.
  Returns:
    the remote port to connect for the specified remote server.

### getPermissionPolicy

    public static RemoteServerManager.PermissionPolicy getPermissionPolicy()

  Returns the permission policy being used for new XMPP entities that are trying to connect to the server. There are two types of policies: 1) blacklist: where any entity is allowed to connect to the server except for those listed in the black list and 2) whitelist: where only the entities listed in the white list are allowed to connect to the server.

  Returns:
    the permission policy being used for new XMPP entities that are trying to connect to the server.

### setPermissionPolicy

    public static void setPermissionPolicy(RemoteServerManager.PermissionPolicy policy)

  Sets the permission policy being used for new XMPP entities that are trying to connect to the server. There are two types of policies: 1) blacklist: where any entity is allowed to connect to the server except for those listed in the black list and 2) whitelist: where only the entities listed in the white list are allowed to connect to the server.

  Parameters:
    `policy` - the new PermissionPolicy to use.

### setPermissionPolicy

    public static void setPermissionPolicy(String policy)

  Sets the permission policy being used for new XMPP entities that are trying to connect to the server. There are two types of policies: 1) blacklist: where any entity is allowed to connect to the server except for those listed in the black list and 2) whitelist: where only the entities listed in the white list are allowed to connect to the server.

  Parameters:
    `policy` - the new policy to use.

Overview | Package | Class | Tree | Deprecated | Index | Help
| Openfire 3.4.3 Javadoc
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2003-2007 Jive Software.