@Service(value=ProfileWatcher.class) public class ProfileWatcherImpl extends io.fabric8.api.scr.AbstractComponent implements ProfileWatcher
Constructor and Description |
---|
ProfileWatcherImpl() |
Modifier and Type | Method and Description |
---|---|
void |
add(String url)
Adds a Bundle URLs to the watch list.
|
protected Map<ProfileVersionKey,Map<String,io.fabric8.agent.mvn.Parser>> |
findProfileArifacts()
For each profile and version return the map of bundle locations to parsers
|
protected SortedSet<String> |
getCurrentActiveProfileVersions()
Gets the set of active profile ids and versions
|
long |
getInterval() |
File |
getLocalRepository() |
Map<ProfileVersionKey,Map<String,io.fabric8.agent.mvn.Parser>> |
getProfileArtifacts()
Returns the currently known profile artifacts
|
List<String> |
getWatchURLs() |
boolean |
isRunning() |
boolean |
isUpload() |
void |
remove(String url)
Removes a bundle URLs from the watch list.
|
protected org.ops4j.pax.url.maven.commons.MavenConfiguration |
retrieveMavenConfiguration() |
void |
run() |
void |
setInterval(long interval) |
void |
setUpload(boolean upload) |
void |
setWatchURLs(List<String> watchURLs) |
void |
start() |
void |
stop()
Stops the execution of the thread and releases the singleton instance
|
protected void |
uploadFile(String bundleUrl,
io.fabric8.agent.mvn.Parser parser,
File fileToUpload)
Uploads the given file to the fabric maven proxy
|
boolean |
wildCardMatch(String text) |
boolean |
wildCardMatch(String text,
String pattern)
Matches text using a pattern containing wildcards.
|
public Map<ProfileVersionKey,Map<String,io.fabric8.agent.mvn.Parser>> getProfileArtifacts()
getProfileArtifacts
in interface ProfileWatcher
protected void uploadFile(String bundleUrl, io.fabric8.agent.mvn.Parser parser, File fileToUpload)
public void add(String url)
add
in interface ProfileWatcher
url
- public void remove(String url)
remove
in interface ProfileWatcher
url
- protected SortedSet<String> getCurrentActiveProfileVersions()
protected Map<ProfileVersionKey,Map<String,io.fabric8.agent.mvn.Parser>> findProfileArifacts() throws Exception
Exception
public File getLocalRepository()
protected org.ops4j.pax.url.maven.commons.MavenConfiguration retrieveMavenConfiguration()
public boolean wildCardMatch(String text)
wildCardMatch
in interface ProfileWatcher
public boolean wildCardMatch(String text, String pattern)
wildCardMatch
in interface ProfileWatcher
text
- pattern
- public void start()
start
in interface ProfileWatcher
public void stop()
stop
in interface ProfileWatcher
public List<String> getWatchURLs()
getWatchURLs
in interface ProfileWatcher
public long getInterval()
public void setInterval(long interval)
setInterval
in interface ProfileWatcher
public boolean isRunning()
public boolean isUpload()
public void setUpload(boolean upload)
setUpload
in interface ProfileWatcher
Copyright © 2011–2014 Red Hat. All rights reserved.