Class DelegationTokenProviderFactory


  • public class DelegationTokenProviderFactory
    extends java.lang.Object
    Factory class for DelegationTokenProvider instances.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static DelegationTokenProvider create​(io.pravega.client.control.impl.Controller controller, io.pravega.client.segment.impl.Segment segment, io.pravega.shared.security.auth.AccessOperation accessOperation)
      Creates a DelegationTokenProvider instance with null delegation token.
      static DelegationTokenProvider create​(io.pravega.client.control.impl.Controller controller, java.lang.String scopeName, java.lang.String streamName, io.pravega.shared.security.auth.AccessOperation accessOperation)
      Creates a DelegationTokenProvider instance with null delegation token.
      static DelegationTokenProvider create​(java.lang.String delegationToken, @NonNull io.pravega.client.control.impl.Controller controller, @NonNull io.pravega.client.segment.impl.Segment segment, io.pravega.shared.security.auth.AccessOperation accessOperation)
      Creates a DelegationTokenProvider instance with the specified delegation token.
      static DelegationTokenProvider create​(java.lang.String delegationToken, io.pravega.client.control.impl.Controller controller, java.lang.String scopeName, java.lang.String streamName, io.pravega.shared.security.auth.AccessOperation accessOperation)
      Creates a DelegationTokenProvider instance of an appropriate type.
      static DelegationTokenProvider createWithEmptyToken()
      Creates a DelegationTokenProvider instance with empty token.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DelegationTokenProviderFactory

        public DelegationTokenProviderFactory()
    • Method Detail

      • create

        public static DelegationTokenProvider create​(io.pravega.client.control.impl.Controller controller,
                                                     java.lang.String scopeName,
                                                     java.lang.String streamName,
                                                     io.pravega.shared.security.auth.AccessOperation accessOperation)
        Creates a DelegationTokenProvider instance with null delegation token.
        Parameters:
        controller - the Controller client used for obtaining a delegation token from the Controller
        scopeName - the name of the scope tied to the segment, for which a delegation token is to be obtained
        streamName - the name of the stream tied to the segment, for which a delegation token is to be obtained
        accessOperation - the access operation to use when requesting a delegation token from the server
        Returns:
        a new DelegationTokenProvider instance
        Throws:
        java.lang.NullPointerException - if controller, scopeName or streamName is null
        java.lang.IllegalArgumentException - if scopeName or streamName is empty
      • create

        public static DelegationTokenProvider create​(io.pravega.client.control.impl.Controller controller,
                                                     io.pravega.client.segment.impl.Segment segment,
                                                     io.pravega.shared.security.auth.AccessOperation accessOperation)
        Creates a DelegationTokenProvider instance with null delegation token.
        Parameters:
        controller - the Controller client used for obtaining a delegation token from the Controller
        segment - the Segment, for which a delegation token is to be obtained
        accessOperation - the access operation to use when requesting a delegation token from the server
        Returns:
        a new DelegationTokenProvider instance
        Throws:
        java.lang.NullPointerException - if controller or segment is null
      • create

        public static DelegationTokenProvider create​(java.lang.String delegationToken,
                                                     @NonNull
                                                     @NonNull io.pravega.client.control.impl.Controller controller,
                                                     @NonNull
                                                     @NonNull io.pravega.client.segment.impl.Segment segment,
                                                     io.pravega.shared.security.auth.AccessOperation accessOperation)
        Creates a DelegationTokenProvider instance with the specified delegation token.
        Parameters:
        delegationToken - an existing delegation token to populate the DelegationTokenProvider instance with
        controller - the Controller client used for obtaining a delegation token from the Controller
        segment - the Segment, for which a delegation token is to be obtained
        accessOperation - the access operation to use when requesting a delegation token from th server
        Returns:
        a new DelegationTokenProvider instance
        Throws:
        java.lang.NullPointerException - if controller or segment is null
      • create

        public static DelegationTokenProvider create​(java.lang.String delegationToken,
                                                     io.pravega.client.control.impl.Controller controller,
                                                     java.lang.String scopeName,
                                                     java.lang.String streamName,
                                                     io.pravega.shared.security.auth.AccessOperation accessOperation)
        Creates a DelegationTokenProvider instance of an appropriate type.
        Parameters:
        delegationToken - an existing delegation token to populate the DelegationTokenProvider instance with.
        controller - the Controller client used for obtaining a delegation token from the Controller if/when the token expires or is nearing expiry
        scopeName - the name of the scope tied to the segment, for which a delegation token is to be obtained
        streamName - the name of the stream tied to the segment, for which a delegation token is to be obtained
        accessOperation - the access operation to use when requesting a delegation token from th server
        Returns:
        a new DelegationTokenProvider instance