public final class SignerFactory
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private static java.lang.String |
NO_OP_SIGNER |
private static java.lang.String |
QUERY_STRING_SIGNER |
private static java.util.Map<java.lang.String,java.lang.Class<? extends Signer>> |
SIGNERS |
private static java.lang.String |
VERSION_FOUR_SIGNER |
private static java.lang.String |
VERSION_THREE_SIGNER |
Modifier | Constructor and Description |
---|---|
private |
SignerFactory()
Private so you're not tempted to instantiate me.
|
Modifier and Type | Method and Description |
---|---|
private static Signer |
createSigner(java.lang.String signerType,
java.lang.String serviceName)
Internal implementation to create a signer by type and service name,
and configuring it with the service name if applicable.
|
static Signer |
getSigner(java.lang.String serviceName,
java.lang.String regionName)
Returns a non-null signer for the specified service and region according
to the internal configuration which provides a basic default algorithm
used for signer determination.
|
static Signer |
getSignerByTypeAndService(java.lang.String signerType,
java.lang.String serviceName)
Returns an instance of the given signer type and configures it with the
given service name (if applicable).
|
private static Signer |
lookupAndCreateSigner(java.lang.String serviceName,
java.lang.String regionName)
Internal implementation for looking up and creating a signer by service
name and region.
|
static void |
registerSigner(java.lang.String signerType,
java.lang.Class<? extends Signer> signerClass)
Register an implementation class for the given signer type.
|
private static final java.lang.String QUERY_STRING_SIGNER
private static final java.lang.String VERSION_THREE_SIGNER
private static final java.lang.String VERSION_FOUR_SIGNER
private static final java.lang.String NO_OP_SIGNER
private static final java.util.Map<java.lang.String,java.lang.Class<? extends Signer>> SIGNERS
private SignerFactory()
public static void registerSigner(java.lang.String signerType, java.lang.Class<? extends Signer> signerClass)
signerType
- The name of the signer type to register.signerClass
- The class implementing the given signature protocol.public static Signer getSigner(java.lang.String serviceName, java.lang.String regionName)
serviceName
- The name of the service to talk to.regionName
- The name of the region to talk to; not necessarily the region
used for signing.public static Signer getSignerByTypeAndService(java.lang.String signerType, java.lang.String serviceName)
signerType
- The type of signer to create.serviceName
- The name of the service to configure on the signer.private static Signer lookupAndCreateSigner(java.lang.String serviceName, java.lang.String regionName)
private static Signer createSigner(java.lang.String signerType, java.lang.String serviceName)