Class CachedInfoMultiAuthServiceCallbacksImpl
- java.lang.Object
-
- com.amazonaws.kinesisvideo.internal.service.DefaultServiceCallbacksImpl
-
- com.amazonaws.kinesisvideo.java.service.CachedInfoMultiAuthServiceCallbacksImpl
-
- All Implemented Interfaces:
ServiceCallbacks
public class CachedInfoMultiAuthServiceCallbacksImpl extends DefaultServiceCallbacksImpl
-
-
Field Summary
-
Fields inherited from class com.amazonaws.kinesisvideo.internal.service.DefaultServiceCallbacksImpl
configuration, executor, kinesisVideoProducer, kinesisVideoServiceClient, log
-
-
Constructor Summary
Constructors Constructor Description CachedInfoMultiAuthServiceCallbacksImpl(org.apache.logging.log4j.Logger log, ScheduledExecutorService executor, KinesisVideoClientConfiguration configuration, KinesisVideoServiceClient kinesisVideoServiceClient)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddCredentialsProviderToCache(String streamName, com.amazonaws.auth.AWSCredentialsProvider credentialsProvider)voidaddStreamInfoToCache(String streamName, com.amazonaws.services.kinesisvideo.model.DescribeStreamResult streamInfo)voidaddStreamingEndpointToCache(String streamName, String endpoint)voidaddTagInfoToCache(String streamName, Tag[] tags)voidcreateStream(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.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 objectbooleanisInitialized()Returns whether the object is initializedvoidremoveStreamFromCache(String streamName)voidtagResource(String resourceArn, Tag[] tagsUnused, long callAfter, long timeout, byte[] authData, int authType, long streamHandle, KinesisVideoProducerStream stream)Asynchronous call to tag resource API-
Methods inherited from class com.amazonaws.kinesisvideo.internal.service.DefaultServiceCallbacksImpl
addStream, createDevice, deviceCertToToken, free, getCredentialsProvider, getStatusCodeFromException, notifyCallResult, putStream, removeStream
-
-
-
-
Constructor Detail
-
CachedInfoMultiAuthServiceCallbacksImpl
public CachedInfoMultiAuthServiceCallbacksImpl(@Nonnull org.apache.logging.log4j.Logger log, @Nonnull ScheduledExecutorService executor, @Nonnull KinesisVideoClientConfiguration configuration, @Nonnull KinesisVideoServiceClient kinesisVideoServiceClient)
-
-
Method Detail
-
initialize
public void initialize(@Nonnull KinesisVideoProducer kinesisVideoProducer)
Initializes the object- Specified by:
initializein interfaceServiceCallbacks- Overrides:
initializein classDefaultServiceCallbacksImpl- Parameters:
kinesisVideoProducer- Reference toKinesisVideoProducerfor the eventing.
-
isInitialized
public boolean isInitialized()
Description copied from interface:ServiceCallbacksReturns whether the object is initialized- Specified by:
isInitializedin interfaceServiceCallbacks- Overrides:
isInitializedin classDefaultServiceCallbacksImpl- Returns:
- whether the object is initialized
-
createStream
public 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, KinesisVideoProducerStream stream) throws ProducerException
Description copied from interface:ServiceCallbacksAsynchronous call to create stream with the specified parameters. PIC will attempt to schedule stream creation if theServiceCallbacks.describeStream(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).- Specified by:
createStreamin interfaceServiceCallbacks- Overrides:
createStreamin classDefaultServiceCallbacksImpl- 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
public void describeStream(@Nonnull String streamName, long callAfter, long timeout, @Nullable byte[] authData, int authType, long streamHandle, KinesisVideoProducerStream stream) throws ProducerException
Description copied from interface:ServiceCallbacksAsynchronous 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)- Specified by:
describeStreamin interfaceServiceCallbacks- Overrides:
describeStreamin classDefaultServiceCallbacksImpl- 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
public void getStreamingEndpoint(@Nonnull String streamName, @Nonnull String apiName, long callAfter, long timeout, @Nullable byte[] authData, int authType, long streamHandle, KinesisVideoProducerStream stream) throws ProducerException
Description copied from interface:ServiceCallbacksAsynchronous 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).- Specified by:
getStreamingEndpointin interfaceServiceCallbacks- Overrides:
getStreamingEndpointin classDefaultServiceCallbacksImpl- 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
public void getStreamingToken(@Nonnull String streamName, long callAfter, long timeout, @Nullable byte[] authData, int authType, long streamHandle, KinesisVideoProducerStream stream) throws ProducerException
Description copied from interface:ServiceCallbacksAsynchronous call to get streaming token- Specified by:
getStreamingTokenin interfaceServiceCallbacks- Overrides:
getStreamingTokenin classDefaultServiceCallbacksImpl- 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
-
tagResource
public void tagResource(@Nonnull String resourceArn, @Nullable Tag[] tagsUnused, long callAfter, long timeout, @Nullable byte[] authData, int authType, long streamHandle, KinesisVideoProducerStream stream) throws ProducerException
Description copied from interface:ServiceCallbacksAsynchronous call to tag resource API- Specified by:
tagResourcein interfaceServiceCallbacks- Overrides:
tagResourcein classDefaultServiceCallbacksImpl- Parameters:
resourceArn- - Resource ARNtagsUnused- - 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
-
addStreamInfoToCache
public void addStreamInfoToCache(String streamName, com.amazonaws.services.kinesisvideo.model.DescribeStreamResult streamInfo)
-
addStreamingEndpointToCache
public void addStreamingEndpointToCache(String streamName, String endpoint)
-
addCredentialsProviderToCache
public void addCredentialsProviderToCache(String streamName, com.amazonaws.auth.AWSCredentialsProvider credentialsProvider)
-
removeStreamFromCache
public void removeStreamFromCache(String streamName)
-
-