Interface DelegationTokenReceiver
-
@Experimental public interface DelegationTokenReceiverDelegation token receiver API. Instances ofDelegationTokenReceivers are loaded both on JobManager and TaskManager side through service loader. Basically the implementation of this interface is responsible to receive the serialized form of tokens produced byDelegationTokenProvider.
-
-
Field Summary
Fields Modifier and Type Field Description static StringCONFIG_PREFIXConfig prefix of receivers.
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description voidinit(Configuration configuration)Called to initialize receiver after construction.voidonNewTokensObtained(byte[] tokens)Callback function when new delegation tokens obtained.default StringserviceConfigPrefix()Config prefix of the service.StringserviceName()Name of the service to receive delegation tokens for.
-
-
-
Field Detail
-
CONFIG_PREFIX
static final String CONFIG_PREFIX
Config prefix of receivers.- See Also:
- Constant Field Values
-
-
Method Detail
-
serviceName
String serviceName()
Name of the service to receive delegation tokens for. This name should be unique and the same as the one provided in the correspondingDelegationTokenProvider.
-
serviceConfigPrefix
default String serviceConfigPrefix()
Config prefix of the service.
-
init
void init(Configuration configuration) throws Exception
Called to initialize receiver after construction.- Parameters:
configuration- Configuration to initialize the receiver.- Throws:
Exception
-
onNewTokensObtained
void onNewTokensObtained(byte[] tokens) throws ExceptionCallback function when new delegation tokens obtained.- Parameters:
tokens- Serialized form of delegation tokens. Must be deserialized the reverse way which is implemented inDelegationTokenProvider.- Throws:
Exception
-
-