Class ProfilePublisherImpl
- java.lang.Object
-
- org.gcube.smartgears.handlers.container.lifecycle.ProfilePublisherImpl
-
- All Implemented Interfaces:
ProfilePublisher
public class ProfilePublisherImpl extends Object implements ProfilePublisher
Publishes the resource profile of the container.Distinguishes publication in new scopes (
#addTo(List)from publication updates in existing scopes (#update(List).- Author:
- Fabio Simeoni
-
-
Constructor Summary
Constructors Constructor Description ProfilePublisherImpl(ContainerContext context)Creates an instance for the container.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddTo(Collection<String> tokens)Adds the current resource profile of the application in one or more scopes.voidaddToAll()Adds the current resource profile of the application in one or more scopes.voidremoveFrom(Collection<String> tokens)Removes the container from one or more scopes.voidupdate()Updates the current resource profile of the application in its current scopes.
-
-
-
Constructor Detail
-
ProfilePublisherImpl
public ProfilePublisherImpl(ContainerContext context)
Creates an instance for the container.- Parameters:
context- the context of the application
-
-
Method Detail
-
addTo
public void addTo(Collection<String> tokens)
Adds the current resource profile of the application in one or more scopes. The scopes are retrieved from tokens- Specified by:
addToin interfaceProfilePublisher- Parameters:
tokens- the tokens
-
addToAll
public void addToAll()
Adds the current resource profile of the application in one or more scopes.- Specified by:
addToAllin interfaceProfilePublisher
-
update
public void update()
Updates the current resource profile of the application in its current scopes.- Specified by:
updatein interfaceProfilePublisher
-
removeFrom
public void removeFrom(Collection<String> tokens)
Removes the container from one or more scopes.- Specified by:
removeFromin interfaceProfilePublisher- Parameters:
tokens- the tokens
-
-