public class ExternalComponentManager extends Object
Modifier and Type | Class and Description |
---|---|
static class |
ExternalComponentManager.PermissionPolicy |
Constructor and Description |
---|
ExternalComponentManager() |
Modifier and Type | Method and Description |
---|---|
static void |
addListener(ExternalComponentManagerListener listener)
Registers a listener to receive events when a configuration change happens.
|
static void |
allowAccess(ExternalComponentConfiguration configuration)
Allows an external component to connect to the local server with the specified configuration.
|
static void |
blockAccess(String subdomain)
Blocks an external component from connecting to the local server.
|
static boolean |
canAccess(String subdomain)
Returns true if the external component with the specified subdomain can connect to the
local server.
|
static void |
deleteConfiguration(String subdomain)
Removes any existing defined permission and configuration for the specified
external component.
|
static Collection<ExternalComponentConfiguration> |
getAllowedComponents()
Returns the list of registered external components that are allowed to connect to this
server when using a whitelist policy.
|
static Collection<ExternalComponentConfiguration> |
getBlockedComponents()
Returns the list of external components that are NOT allowed to connect to this
server.
|
static String |
getDefaultSecret()
Returns the default secret key to use for those external components that don't have an
individual configuration.
|
static ExternalComponentManager.PermissionPolicy |
getPermissionPolicy()
Returns the permission policy being used for new XMPP entities that are trying to
connect to the server.
|
static String |
getSecretForComponent(String subdomain)
Returns the shared secret with the specified external component.
|
static int |
getServicePort()
Deprecated.
Obtain and use the corresponding
ConnectionListener instead. |
static boolean |
hasConfiguration(String subdomain)
Returns true if there is a configuration for the specified subdomain.
|
static boolean |
isServiceEnabled()
Deprecated.
Obtain and use the corresponding
ConnectionListener instead. |
static void |
removeListener(ExternalComponentManagerListener listener)
Unregisters a listener to receive events.
|
static void |
setDefaultSecret(String defaultSecret)
Sets the default secret key to use for those external components that don't have an
individual configuration.
|
static void |
setPermissionPolicy(ExternalComponentManager.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.
|
static void |
setServiceEnabled(boolean enabled)
Deprecated.
Obtain and use the corresponding
ConnectionListener instead. |
static void |
setServicePort(int port)
Deprecated.
Obtain and use the corresponding
ConnectionListener instead. |
static void |
updateComponentSecret(String subdomain,
String secret) |
@Deprecated public static void setServiceEnabled(boolean enabled) throws ModificationNotAllowedException
ConnectionListener
instead.ModificationNotAllowedException
@Deprecated public static boolean isServiceEnabled()
ConnectionListener
instead.@Deprecated public static void setServicePort(int port) throws ModificationNotAllowedException
ConnectionListener
instead.ModificationNotAllowedException
@Deprecated public static int getServicePort()
ConnectionListener
instead.public static void allowAccess(ExternalComponentConfiguration configuration) throws ModificationNotAllowedException
configuration
- the configuration for the external component.ModificationNotAllowedException
- if the operation was denied.public static void blockAccess(String subdomain) throws ModificationNotAllowedException
subdomain
- the subdomain of the external component that is not allowed to connect.ModificationNotAllowedException
- if the operation was denied.public static boolean canAccess(String subdomain)
subdomain
- the subdomain of the external component.public static boolean hasConfiguration(String subdomain)
subdomain
- the subdomain of the external component.public static Collection<ExternalComponentConfiguration> getAllowedComponents()
public static Collection<ExternalComponentConfiguration> getBlockedComponents()
public static void updateComponentSecret(String subdomain, String secret) throws ModificationNotAllowedException
ModificationNotAllowedException
public static void deleteConfiguration(String subdomain) throws ModificationNotAllowedException
subdomain
- the subdomain of the external component.ModificationNotAllowedException
- if the operation was denied.public static String getDefaultSecret()
public static void setDefaultSecret(String defaultSecret) throws ModificationNotAllowedException
defaultSecret
- the default secret key to use for those external components that
don't have an individual configuration.ModificationNotAllowedException
- if the operation was denied.public static String getSecretForComponent(String subdomain)
subdomain
- the subdomain of the external component to get his shared secret.
(e.g. conference)public static ExternalComponentManager.PermissionPolicy getPermissionPolicy()
public static void setPermissionPolicy(ExternalComponentManager.PermissionPolicy policy) throws ModificationNotAllowedException
policy
- the new PermissionPolicy to use.ModificationNotAllowedException
- if the operation was denied.public static void setPermissionPolicy(String policy) throws ModificationNotAllowedException
policy
- the new policy to use.ModificationNotAllowedException
- if the operation was denied.public static void addListener(ExternalComponentManagerListener listener)
listener
- the listener.public static void removeListener(ExternalComponentManagerListener listener)
listener
- the listener.Copyright © 2003-2008 Jive Software.