public class JsonStreamService extends Object implements StreamService
| Constructor and Description |
|---|
JsonStreamService() |
| Modifier and Type | Method and Description |
|---|---|
StreamComponent |
getComponentBy(URI repositoryURL,
Codebase codebase)
Get the StreamComponent which specifies the given repository and codebase.
|
List<URI> |
getDistinctURLRepositories()
Retrieve all Repositories across all Streams.
|
List<URI> |
getDistinctURLRepositoriesByStream(String streamName)
Retrieve the URLs of all Repositories associated with a given Stream.
|
Stream |
getStream(String streamName)
Get a specific
Stream object based upon its String name. |
List<Stream> |
getStreams()
Returns all streams discovered by this service.
|
List<Stream> |
getStreamsBy(URI repositoryURL,
Codebase codebase)
Find all the streams associated to the given repository and codebase
|
boolean |
init(Aphrodite aphrodite,
AphroditeConfig config)
Initialize the stream service.
|
void |
serializeStreams(URL url,
OutputStream out)
Serialize streams for certain URL.
|
StreamComponent |
updateStreamComponent(StreamComponent streamComponent)
Updates stream component version in memory and in back end storage if possible.
|
boolean |
updateStreams()
Trigger for updating streams information.
|
public boolean init(Aphrodite aphrodite, AphroditeConfig config) throws NotFoundException
StreamServiceinit in interface StreamServiceNotFoundExceptionpublic boolean updateStreams()
throws NotFoundException
StreamServiceupdateStreams in interface StreamServiceNotFoundExceptionpublic List<Stream> getStreams()
StreamServicegetStreams in interface StreamServiceStreamService, or an empty list if no streams exist.public Stream getStream(String streamName)
StreamServiceStream object based upon its String name.getStream in interface StreamServicestreamName - the name of the Stream to be returned.Stream object which corresponds to the specified streamName
if it exists, otherwise null.public List<URI> getDistinctURLRepositories()
StreamServicegetDistinctURLRepositories in interface StreamServicepublic List<URI> getDistinctURLRepositoriesByStream(String streamName)
StreamServicegetDistinctURLRepositoriesByStream in interface StreamServicestreamName - the name of the Stream containing the returned repositories.public List<Stream> getStreamsBy(URI repositoryURL, Codebase codebase)
StreamServicegetStreamsBy in interface StreamServicerepositoryURL - the Repository to search against.codebase - the Codebase to search against.Stream objects.public StreamComponent getComponentBy(URI repositoryURL, Codebase codebase)
StreamServicegetComponentBy in interface StreamServicerepositoryURL - the Repository to be searched against.codebase - the codebase to be searched against.public StreamComponent updateStreamComponent(StreamComponent streamComponent) throws StreamComponentUpdateException
StreamServiceupdateStreamComponent in interface StreamServicestreamComponent - - component which should be updatedStreamComponentUpdateException - - in case there is some error on update.public void serializeStreams(URL url, OutputStream out) throws NotFoundException
StreamServiceserializeStreams in interface StreamServiceurl - - urlout - - sink for bytesNotFoundException - - if url does not match any set of streamsCopyright © 2020 JBoss by Red Hat. All rights reserved.