Class MultiAuthServiceCallbacksImpl
- java.lang.Object
-
- com.amazonaws.kinesisvideo.internal.service.DefaultServiceCallbacksImpl
-
- com.amazonaws.kinesisvideo.java.service.MultiAuthServiceCallbacksImpl
-
- All Implemented Interfaces:
ServiceCallbacks
public class MultiAuthServiceCallbacksImpl extends DefaultServiceCallbacksImpl
-
-
Field Summary
Fields Modifier and Type Field Description protected Function<StreamInfo,com.amazonaws.auth.AWSCredentialsProvider>credentialsProviderFnGiven a StreamInfo object, determine which credentials to use.-
Fields inherited from class com.amazonaws.kinesisvideo.internal.service.DefaultServiceCallbacksImpl
configuration, executor, kinesisVideoProducer, kinesisVideoServiceClient, log
-
-
Constructor Summary
Constructors Constructor Description MultiAuthServiceCallbacksImpl(ScheduledExecutorService executor, KinesisVideoClientConfiguration configuration, KinesisVideoServiceClient kinesisVideoServiceClient, Function<StreamInfo,com.amazonaws.auth.AWSCredentialsProvider> credentialsProviderFn)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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 tokenvoidtagResource(String resourceArn, Tag[] tags, 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, initialize, isInitialized, notifyCallResult, putStream, removeStream
-
-
-
-
Field Detail
-
credentialsProviderFn
protected Function<StreamInfo,com.amazonaws.auth.AWSCredentialsProvider> credentialsProviderFn
Given a StreamInfo object, determine which credentials to use.
-
-
Constructor Detail
-
MultiAuthServiceCallbacksImpl
public MultiAuthServiceCallbacksImpl(@Nonnull ScheduledExecutorService executor, @Nonnull KinesisVideoClientConfiguration configuration, @Nonnull KinesisVideoServiceClient kinesisVideoServiceClient, @Nonnull Function<StreamInfo,com.amazonaws.auth.AWSCredentialsProvider> credentialsProviderFn)
- Parameters:
credentialsProviderFn- Used to determine which AWS credentials to use per stream. You can extend StreamInfo and add additional metadata for your business logic.
-
-
Method Detail
-
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[] tags, 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 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
-
-