public class PCAutoSigner
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
void |
assignUser(PCUser user,
PCAutoSignerCallback callback)
Attaches AutoSigner to a given user.
|
void |
autoSign(PCTransaction transaction,
ScoringSettings scoringSettings,
PCAutoSignerCallback callback)
Automatically signs specified
PCTransaction on behalf of attached PCUser |
java.lang.String |
getAssignedUserId()
Returns user ID of assigned
PCUser or null if no user is assigned |
static PCAutoSigner |
getInstance()
Instance of AutoSigner created at initializing PC SDK
|
boolean |
isReady()
Checks if AutoSigner is in appropriate state to be immediately used for automatically signing transactions
|
public static PCAutoSigner getInstance()
public void assignUser(PCUser user, PCAutoSignerCallback callback)
user
- Target PCUser
. Pass null if AutoSigner should be detached from a currently
assigned usercallback
- Instance of PCAutoSignerCallback
to handle results. Might be null if user is null
(detaching is always successful)public java.lang.String getAssignedUserId()
PCUser
or null if no user is assignedpublic void autoSign(PCTransaction transaction, ScoringSettings scoringSettings, PCAutoSignerCallback callback)
PCTransaction
on behalf of attached PCUser
transaction
- PCTransaction
to be automatically signedscoringSettings
- Instance of ScoringSettings
obtained from
PCUsersManager.getScoringSettings(PCUser, PCGetScoringSettingsCallback)
callback
- Instance of PCAutoSignerCallback
to handle resultspublic boolean isReady()