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