Class CosmosAuthorizationHeaderImpl
- java.lang.Object
-
- com.adaptris.core.ServiceImp
-
- com.adaptris.interlok.azure.cosmosdb.CosmosAuthorizationHeaderImpl
-
- All Implemented Interfaces:
AdaptrisComponent,ComponentLifecycle,ComponentLifecycleExtension,MessageEventGenerator,Service,StateManagedComponent
- Direct Known Subclasses:
CosmosAuthorizationHeader,CosmosAuthorizationHeaderFromUrl
public abstract class CosmosAuthorizationHeaderImpl extends ServiceImp
Abstract base class for generating Authorization headers.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringDEFAULT_METADATA_KEYThe default metadata key for thesetTargetKey(String); set to be "Authorization".static java.lang.StringX_MS_DATEThe "x-ms-date" header, added as metadata by the services.-
Fields inherited from class com.adaptris.core.ServiceImp
log
-
-
Constructor Summary
Constructors Constructor Description CosmosAuthorizationHeaderImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcloseService()@NonNull java.lang.StringgetHttpVerb()The Verb portion of the hashed token signature is the HTTP verb, such as GET, POST, or PUT.@NonNull java.lang.StringgetMasterKey()Your master key token.java.lang.StringgetTargetKey()The metadata key that will hold the Authorization output.protected voidinitService()voidprepare()voidsetHttpVerb(@NonNull java.lang.String httpVerb)The Verb portion of the hashed token signature is the HTTP verb, such as GET, POST, or PUT.voidsetMasterKey(@NonNull java.lang.String masterKey)Your master key token.voidsetTargetKey(java.lang.String targetKey)The metadata key that will hold the Authorization output.protected java.lang.StringtargetKey()<T extends CosmosAuthorizationHeaderImpl>
TwithHttpVerb(java.lang.String s)<T extends CosmosAuthorizationHeaderImpl>
TwithMasterKey(java.lang.String s)<T extends CosmosAuthorizationHeaderImpl>
TwithTargetKey(java.lang.String s)-
Methods inherited from class com.adaptris.core.ServiceImp
changeState, close, continueOnFailure, createName, createQualifier, getContinueOnFail, getIsTrackingEndpoint, getUniqueId, init, isBranching, isTrackingEndpoint, requestClose, requestInit, requestStart, requestStop, retrieveComponentState, setContinueOnFail, setIsTrackingEndpoint, setUniqueId, start, stop
-
-
-
-
Field Detail
-
DEFAULT_METADATA_KEY
public static final java.lang.String DEFAULT_METADATA_KEY
The default metadata key for thesetTargetKey(String); set to be "Authorization".- See Also:
- Constant Field Values
-
X_MS_DATE
public static final java.lang.String X_MS_DATE
The "x-ms-date" header, added as metadata by the services.- See Also:
- Constant Field Values
-
-
Method Detail
-
prepare
public void prepare() throws CoreException- Throws:
CoreException
-
initService
protected void initService() throws CoreException- Specified by:
initServicein classServiceImp- Throws:
CoreException
-
closeService
protected void closeService()
- Specified by:
closeServicein classServiceImp
-
withMasterKey
public <T extends CosmosAuthorizationHeaderImpl> T withMasterKey(java.lang.String s)
-
withTargetKey
public <T extends CosmosAuthorizationHeaderImpl> T withTargetKey(java.lang.String s)
-
withHttpVerb
public <T extends CosmosAuthorizationHeaderImpl> T withHttpVerb(java.lang.String s)
-
targetKey
protected java.lang.String targetKey()
-
getTargetKey
public java.lang.String getTargetKey()
The metadata key that will hold the Authorization output.
-
setTargetKey
public void setTargetKey(java.lang.String targetKey)
The metadata key that will hold the Authorization output.
-
getHttpVerb
@NonNull public @NonNull java.lang.String getHttpVerb()
The Verb portion of the hashed token signature is the HTTP verb, such as GET, POST, or PUT.
-
setHttpVerb
public void setHttpVerb(@NonNull @NonNull java.lang.String httpVerb)The Verb portion of the hashed token signature is the HTTP verb, such as GET, POST, or PUT.
-
getMasterKey
@NonNull public @NonNull java.lang.String getMasterKey()
Your master key token.
-
setMasterKey
public void setMasterKey(@NonNull @NonNull java.lang.String masterKey)Your master key token.
-
-