Interface ExternalComponentManagerListener
-
public interface ExternalComponentManagerListenerListener 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 voidcomponentAllowed(String subdomain, ExternalComponentConfiguration configuration)Notification indicating that a new component was allowed to connect using a given configuration.voidcomponentBlocked(String subdomain)Notification indicating that a component was blocked to connect to the server.voidcomponentConfigurationDeleted(String subdomain)Notification indicating that the configuration of a component, that was either blocked or allowed to connect, is being deleted.voidcomponentSecretUpdated(String subdomain, String newSecret)Notification indicating that the configuration of a component, that was either blocked or allowed to connect, is being deleted.voiddefaultSecretChanged(String newSecret)Notification indicating that the default secret is being modified.voidpermissionPolicyChanged(ExternalComponentManager.PermissionPolicy newPolicy)Notification indicating that the permission policy is being modified.voidportChanged(int newPort)Notification indicating that the port used by external components is being modified.voidserviceEnabled(boolean enabled)Notification indicating whether the service is being enabled or disabled.
-
-
-
Method Detail
-
serviceEnabled
void serviceEnabled(boolean enabled) throws ModificationNotAllowedExceptionNotification 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 ModificationNotAllowedExceptionNotification 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.PermissionPolicyfor 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.
-
-