Interface ExternalComponentManagerListener
-
public interface ExternalComponentManagerListener
Listener that will be alerted when an external component is disabled/enabled, the port is changed or configuration about an external component is modified.All listeners of the event will be alerted. Moreover, listeners have the chance to deny a change from happening. If a single listener denied the operation then it will not be allowed.
- Author:
- Gaston Dombiak
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
componentAllowed(String subdomain, ExternalComponentConfiguration configuration)
Notification indicating that a new component was allowed to connect using a given configuration.void
componentBlocked(String subdomain)
Notification indicating that a component was blocked to connect to the server.void
componentConfigurationDeleted(String subdomain)
Notification indicating that the configuration of a component, that was either blocked or allowed to connect, is being deleted.void
componentSecretUpdated(String subdomain, String newSecret)
Notification indicating that the configuration of a component, that was either blocked or allowed to connect, is being deleted.void
defaultSecretChanged(String newSecret)
Notification indicating that the default secret is being modified.void
permissionPolicyChanged(ExternalComponentManager.PermissionPolicy newPolicy)
Notification indicating that the permission policy is being modified.void
portChanged(int newPort)
Notification indicating that the port used by external components is being modified.void
serviceEnabled(boolean enabled)
Notification indicating whether the service is being enabled or disabled.
-
-
-
Method Detail
-
serviceEnabled
void serviceEnabled(boolean enabled) throws ModificationNotAllowedException
Notification indicating whether the service is being enabled or disabled. The listener may throw an exception to not allow the change from taking place.- Parameters:
enabled
- true if the service is being enabled.- Throws:
ModificationNotAllowedException
- if the operation was denied.
-
portChanged
void portChanged(int newPort) throws ModificationNotAllowedException
Notification indicating that the port used by external components is being modified. The listener may throw an exception to not allow the change from taking place.- Parameters:
newPort
- new default secret being set.- Throws:
ModificationNotAllowedException
- if the operation was denied.
-
defaultSecretChanged
void defaultSecretChanged(String newSecret) throws ModificationNotAllowedException
Notification indicating that the default secret is being modified. The listener may throw an exception to not allow the change from taking place.- Parameters:
newSecret
- new default secret being set.- Throws:
ModificationNotAllowedException
- if the operation was denied.
-
permissionPolicyChanged
void permissionPolicyChanged(ExternalComponentManager.PermissionPolicy newPolicy) throws ModificationNotAllowedException
Notification indicating that the permission policy is being modified. SeeExternalComponentManager.PermissionPolicy
for more information. The listener may throw an exception to not allow the change from taking place.- Parameters:
newPolicy
- new permission policy being set.- Throws:
ModificationNotAllowedException
- if the operation was denied.
-
componentAllowed
void componentAllowed(String subdomain, ExternalComponentConfiguration configuration) throws ModificationNotAllowedException
Notification indicating that a new component was allowed to connect using a given configuration. The listener may throw an exception to not allow the change from taking place.- Parameters:
subdomain
- subdomain of the added component.configuration
- configuration for the external component.- Throws:
ModificationNotAllowedException
- if the operation was denied.
-
componentBlocked
void componentBlocked(String subdomain) throws ModificationNotAllowedException
Notification indicating that a component was blocked to connect to the server. The listener may throw an exception to not allow the change from taking place.- Parameters:
subdomain
- subdomain of the blocked component.- Throws:
ModificationNotAllowedException
- if the operation was denied.
-
componentSecretUpdated
void componentSecretUpdated(String subdomain, String newSecret) throws ModificationNotAllowedException
Notification indicating that the configuration of a component, that was either blocked or allowed to connect, is being deleted. The listener may throw an exception to not allow the change from taking place.- Parameters:
subdomain
- subdomain of the component.newSecret
- new secret being set for the component.- Throws:
ModificationNotAllowedException
- if the operation was denied.
-
componentConfigurationDeleted
void componentConfigurationDeleted(String subdomain) throws ModificationNotAllowedException
Notification indicating that the configuration of a component, that was either blocked or allowed to connect, is being deleted. The listener may throw an exception to not allow the change from taking place.- Parameters:
subdomain
- subdomain of the component.- Throws:
ModificationNotAllowedException
- if the operation was denied.
-
-