Interface ServiceCallbacks
-
- All Known Implementing Classes:
CachedInfoMultiAuthServiceCallbacksImpl,DefaultServiceCallbacksImpl,MultiAuthServiceCallbacksImpl
public interface ServiceCallbacksInterface to the KinesisVideo Producer Stream Service Callbacks functionality. These will be used for scheduling and managing the service calls.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddStream(KinesisVideoProducerStream kinesisVideoProducerStream)Add a producer stream to ongoing stream listvoidcreateDevice(String deviceName, long callAfter, long timeout, byte[] authData, int authType, long customData)Asynchronous call to create devicevoidcreateStream(String deviceName, String streamName, String contentType, String kmsKeyId, long retentionPeriod, long callAfter, long timeout, byte[] authData, int authType, KinesisVideoProducerStream stream)Asynchronous call to create stream with the specified parameters.voiddescribeStream(String streamName, long callAfter, long timeout, byte[] authData, int authType, long streamHandle, KinesisVideoProducerStream stream)Asynchronous call to describe stream with the specified parameters.voiddeviceCertToToken(String deviceName, long callAfter, long timeout, byte[] authData, int authType, long customData)Asynchronous call to device certificate to token API.voidfree()Frees the callbacks object.voidgetStreamingEndpoint(String streamName, String apiName, long callAfter, long timeout, byte[] authData, int authType, long streamHandle, KinesisVideoProducerStream stream)Asynchronous call to get streaming endpoint with the specified parameters.voidgetStreamingToken(String streamName, long callAfter, long timeout, byte[] authData, int authType, long streamHandle, KinesisVideoProducerStream stream)Asynchronous call to get streaming tokenvoidinitialize(KinesisVideoProducer kinesisVideoProducer)Initializes the callbacks objectbooleanisInitialized()Returns whether the object is initializedvoidputStream(String streamName, String containerType, long streamStartTime, boolean absoluteFragmentTimes, boolean ackRequired, String streamingEndpoint, long callAfter, long timeout, byte[] authData, int authType, KinesisVideoProducerStream stream)Asynchronous call to put stream APIvoidremoveStream(KinesisVideoProducerStream kinesisVideoProducerStream)Removes a producer stream to ongoing stream listvoidtagResource(String resourceArn, Tag[] tags, long callAfter, long timeout, byte[] authData, int authType, long streamHandle, KinesisVideoProducerStream stream)Asynchronous call to tag resource API
-
-
-
Method Detail
-
initialize
void initialize(@Nonnull KinesisVideoProducer kinesisVideoProducer) throws ProducerException
Initializes the callbacks object- Parameters:
kinesisVideoProducer- Reference toKinesisVideoProducerfor the eventing.- Throws:
ProducerException
-
free
void free()
Frees the callbacks object.
-
isInitialized
boolean isInitialized()
Returns whether the object is initialized- Returns:
- whether the object is initialized
-
createStream
void createStream(@Nonnull String deviceName, @Nonnull String streamName, @Nonnull String contentType, @Nullable String kmsKeyId, long retentionPeriod, long callAfter, long timeout, @Nullable byte[] authData, int authType, @Nonnull KinesisVideoProducerStream stream) throws ProducerException
Asynchronous call to create stream with the specified parameters. PIC will attempt to schedule stream creation if thedescribeStream(String, long, long, byte[], int, long, KinesisVideoProducerStream)posts aKinesisVideoProducer.describeStreamResult(KinesisVideoProducerStream, long, StreamDescription, int)of 404 (Resource Not Found). This call will be skipped ifStreamInfo.isAllowStreamCreation()is not allowed.This method will notify PIC the success or failure of the operation via
KinesisVideoProducer.createStreamResult(KinesisVideoProducerStream, String, int).- Parameters:
deviceName- - Device namestreamName- - Stream namecontentType- - Stream content typekmsKeyId- - KMS Key IdretentionPeriod- - Stream retention period - 100nscallAfter- - Call after this time - 100nstimeout- - Time out for the call - 100nsauthData- - Authentication bitsauthType- - Authentication type - this is the AUTH_INFO_TYPE defined in /src/client/Include.hstream- - stream object for the result event callback- Throws:
ProducerException- See Also:
- CreateStream API
-
describeStream
void describeStream(@Nonnull String streamName, long callAfter, long timeout, @Nullable byte[] authData, int authType, long streamHandle, KinesisVideoProducerStream stream) throws ProducerException
Asynchronous call to describe stream with the specified parameters.This method will notify PIC the success or failure of the operation via
KinesisVideoProducer.describeStreamResult(KinesisVideoProducerStream, long, StreamDescription, int)- Parameters:
streamName- - Stream namecallAfter- - Call after this time - 100nstimeout- - Time out for the call - 100nsauthData- - Authentication bitsauthType- - Authentication type - this is the AUTH_INFO_TYPE defined in /src/client/Include.hstreamHandle- - stream handle returned by PICstream- - stream object for the result event callback- Throws:
ProducerException- See Also:
- DescribeStream API
-
getStreamingEndpoint
void getStreamingEndpoint(@Nonnull String streamName, @Nonnull String apiName, long callAfter, long timeout, @Nullable byte[] authData, int authType, long streamHandle, KinesisVideoProducerStream stream) throws ProducerException
Asynchronous call to get streaming endpoint with the specified parameters.This method will notify PIC the success or failure of the operation via
KinesisVideoProducer.getStreamingEndpointResult(KinesisVideoProducerStream, long, String, int).- Parameters:
streamName- - Stream nameapiName- - API name to callcallAfter- - Call after this time - 100nstimeout- - Time out for the call - 100nsauthData- - Authentication bitsauthType- - Authentication type - this is the AUTH_INFO_TYPE defined in /src/client/Include.hstreamHandle- - stream handle returned by PICstream- - stream object for the result event callback- Throws:
ProducerException- See Also:
- GetDataEndpoint API
-
getStreamingToken
void getStreamingToken(@Nonnull String streamName, long callAfter, long timeout, @Nullable byte[] authData, int authType, long streamHandle, KinesisVideoProducerStream stream) throws ProducerException
Asynchronous call to get streaming token- Parameters:
streamName- - Stream namecallAfter- - Call after this time - 100nstimeout- - Time out for the call - 100nsauthData- - Authentication bitsauthType- - Authentication type - this is the AUTH_INFO_TYPE defined in /src/client/Include.hstreamHandle- - stream handle returned by PICstream- - stream object for the result event callback- Throws:
ProducerException
-
putStream
void putStream(@Nonnull String streamName, @Nonnull String containerType, long streamStartTime, boolean absoluteFragmentTimes, boolean ackRequired, @Nonnull String streamingEndpoint, long callAfter, long timeout, @Nullable byte[] authData, int authType, KinesisVideoProducerStream stream) throws ProducerException
Asynchronous call to put stream API- Parameters:
streamName- - Stream namecontainerType- - Container typestreamStartTime- - Stream start timestampabsoluteFragmentTimes- - Whether to use absolute fragment timesackRequired- - Whether an application level ACK is requiredstreamingEndpoint- - The streaming endpoint to usecallAfter- - Call after this time - 100nstimeout- - Time out for the call - 100nsauthData- - Authentication bitsauthType- - Authentication type - this is the AUTH_INFO_TYPE defined in /src/client/Include.hstream- - stream object for the result event callback- Throws:
ProducerException
-
tagResource
void tagResource(@Nonnull String resourceArn, @Nullable Tag[] tags, long callAfter, long timeout, @Nullable byte[] authData, int authType, long streamHandle, KinesisVideoProducerStream stream) throws ProducerException
Asynchronous call to tag resource API- Parameters:
resourceArn- - Resource ARNtags- - Tags to applycallAfter- - Call after this time - 100nstimeout- - Time out for the call - 100nsauthData- - Authentication bitsauthType- - Authentication type - this is the AUTH_INFO_TYPE defined in /src/client/Include.hstreamHandle- - stream handle returned by PICstream- - stream object for the result event callback- Throws:
ProducerException
-
createDevice
void createDevice(@Nonnull String deviceName, long callAfter, long timeout, @Nullable byte[] authData, int authType, long customData) throws ProducerException
Asynchronous call to create device- Parameters:
deviceName- - Device namecallAfter- - Call after this time - 100nstimeout- - Time out for the call - 100nsauthData- - Authentication bitsauthType- - Authentication type - this is the AUTH_INFO_TYPE defined in /src/client/Include.hcustomData- - Custom data to use to call the event functions- Throws:
ProducerException
-
deviceCertToToken
void deviceCertToToken(@Nonnull String deviceName, long callAfter, long timeout, @Nullable byte[] authData, int authType, long customData) throws ProducerException
Asynchronous call to device certificate to token API. Called when AuthType is AUTH_INFO_TYPE_CERT.- Parameters:
deviceName- - Device namecallAfter- - Call after this time - 100nstimeout- - Time out for the call - 100nsauthData- - Authentication bitsauthType- - Authentication type - this is the AUTH_INFO_TYPE defined in /src/client/Include.hcustomData- - Custom data to use to call the event functions- Throws:
ProducerException
-
addStream
void addStream(@Nonnull KinesisVideoProducerStream kinesisVideoProducerStream)
Add a producer stream to ongoing stream list- Parameters:
kinesisVideoProducerStream- producer stream used by PIC
-
removeStream
void removeStream(@Nonnull KinesisVideoProducerStream kinesisVideoProducerStream)
Removes a producer stream to ongoing stream list- Parameters:
kinesisVideoProducerStream- producer stream used by PIC
-
-