Package io.pravega.client.security.auth
Class DelegationTokenProviderFactory
- java.lang.Object
- 
- io.pravega.client.security.auth.DelegationTokenProviderFactory
 
- 
 public class DelegationTokenProviderFactory extends java.lang.ObjectFactory class forDelegationTokenProviderinstances.
- 
- 
Constructor SummaryConstructors Constructor Description DelegationTokenProviderFactory()
 - 
Method SummaryAll Methods Static Methods Concrete Methods Modifier and Type Method Description static DelegationTokenProvidercreate(io.pravega.client.control.impl.Controller controller, io.pravega.client.segment.impl.Segment segment, io.pravega.shared.security.auth.AccessOperation accessOperation)Creates aDelegationTokenProviderinstance with null delegation token.static DelegationTokenProvidercreate(io.pravega.client.control.impl.Controller controller, java.lang.String scopeName, java.lang.String streamName, io.pravega.shared.security.auth.AccessOperation accessOperation)Creates aDelegationTokenProviderinstance with null delegation token.static DelegationTokenProvidercreate(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 aDelegationTokenProviderinstance with the specified delegation token.static DelegationTokenProvidercreate(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 aDelegationTokenProviderinstance of an appropriate type.static DelegationTokenProvidercreateWithEmptyToken()Creates aDelegationTokenProviderinstance with empty token.
 
- 
- 
- 
Method Detail- 
createWithEmptyTokenpublic static DelegationTokenProvider createWithEmptyToken() Creates aDelegationTokenProviderinstance with empty token. Intended to be Used for testing only.- Returns:
- a new DelegationTokenProviderinstance
 
 - 
createpublic 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 aDelegationTokenProviderinstance with null delegation token.- Parameters:
- controller- the- Controllerclient 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 DelegationTokenProviderinstance
- Throws:
- java.lang.NullPointerException- if- controller,- scopeNameor- streamNameis null
- java.lang.IllegalArgumentException- if- scopeNameor- streamNameis empty
 
 - 
createpublic 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 aDelegationTokenProviderinstance with null delegation token.- Parameters:
- controller- the- Controllerclient 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 DelegationTokenProviderinstance
- Throws:
- java.lang.NullPointerException- if- controlleror- segmentis null
 
 - 
createpublic 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 aDelegationTokenProviderinstance with the specified delegation token.- Parameters:
- delegationToken- an existing delegation token to populate the- DelegationTokenProviderinstance with
- controller- the- Controllerclient 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 DelegationTokenProviderinstance
- Throws:
- java.lang.NullPointerException- if- controlleror- segmentis null
 
 - 
createpublic 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 aDelegationTokenProviderinstance of an appropriate type.- Parameters:
- delegationToken- an existing delegation token to populate the- DelegationTokenProviderinstance with.
- controller- the- Controllerclient 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 DelegationTokenProviderinstance
 
 
- 
 
-