public class StreamingService
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
EventConsumer |
createConsumer(NBEventListener listener)
Create an event consumer
|
EventProducer |
createProducer()
Create a stream producer
|
Profile |
createProfile(java.lang.String streamSynopsis,
int synopsisType)
Create a profile based on the synopsisTypeString and the synopsis
|
static StreamingService |
getInstance()
Get an instance of the StreamingService
|
void |
initialize(java.lang.String configurationFile,
int entityId,
java.util.Properties props,
java.lang.String commType)
Initialize the streaming service based on the specified parameters
|
boolean |
isInitialized()
Checks to see if the streaming service has been initialized.
|
static void |
main(java.lang.String[] args) |
void |
writeToStream(java.lang.String streamSynopsis,
byte[] payload)
Writes a byte[] payload onto the specified stream
|
void |
writeToStream(java.lang.String streamSynopsis,
int synopsisType,
byte[] payload)
Writes a byte[] payload onto the specified stream
|
public static StreamingService getInstance()
public void initialize(java.lang.String configurationFile, int entityId, java.util.Properties props, java.lang.String commType) throws CommunicationsException
configurationFile
- Used to specify configuration of various servicesentityId
- The identifier associated with this entity/resourceprops
- Properties for initializing communications with the brokercommType
- The communication type to be usedCommunicationsException
- If there are communication problems when performing the
operation.public boolean isInitialized()
true
if it is, and true
otherwise.public EventProducer createProducer() throws CommunicationsException
CommunicationsException
- If there are communication problems when performing the
operation.public EventConsumer createConsumer(NBEventListener listener) throws CommunicationsException
listener
- The listener who would be notified when streams are availableCommunicationsException
- If there are communication problems when performing the
operation.public Profile createProfile(java.lang.String streamSynopsis, int synopsisType) throws CommunicationsException
streamSynopsis
- The synopsis of the StreamsynopsisType
- The synopsis type of the stream in questionCommunicationsException
- If there are communication problems when performing the
operation.public void writeToStream(java.lang.String streamSynopsis, byte[] payload) throws CommunicationsException
streamSynopsis
- The synopsis of the Streampayload
- The payload for the stream fragmentCommunicationsException
- If there are communication problems when performing the
operation.public void writeToStream(java.lang.String streamSynopsis, int synopsisType, byte[] payload) throws CommunicationsException
streamSynopsis
- The synopsis of the StreamsynopsisType
- The synopsis type of the stream in questionpayload
- The payload for the stream fragmentCommunicationsException
- If there are communication problems when performing the
operation.public static void main(java.lang.String[] args)
args
-