Class SoSigningDevice
- java.lang.Object
-
- com.stepover.opensignatureapi.device.SoSigningDevice
-
- All Implemented Interfaces:
MessageReceiver
,SigningDevice
- Direct Known Subclasses:
NativeDevice
,SoHeadlessSigningDevice
public class SoSigningDevice extends java.lang.Object implements SigningDevice, MessageReceiver
the base class for all StepOver signing devices
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.jopensignature.sign.SigningDevice
SigningDevice.UnsupportedMessageException
-
-
Field Summary
Fields Modifier and Type Field Description protected com.stepover.opensignatureapi.jna.sopad.BioData
bioData
The bio data.protected SoSigningDeviceCapabilities
capabilities
The capabilities.protected SoDeviceConfiguration
configuration
The configuration.protected DocumentRenderer
documentRenderer
The document rendererprotected AbstractDocumentViewer
documentViewer
The document viewer.static int
GEN12
static int
GEN13
protected java.lang.String
identifier
The identifier.protected static java.util.logging.Logger
log
The log.protected Signer
signer
The signerprotected SoSigningDeviceInfo
signingDeviceInfo
static java.util.Vector<java.lang.Thread>
threads
keep track of threads
-
Constructor Summary
Constructors Constructor Description SoSigningDevice()
SoSigningDevice(java.lang.String identifier)
Instantiates a new so signing device.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
com.stepover.opensignatureapi.jna.sopad.BioData
getBioData()
SoSigningDeviceCapabilities
getCapabilities()
Returns the device capabilities.SoDeviceConfiguration
getConfiguration()
Gets the configuration.AbstractDocumentViewer
getDocumentViewer()
Gets the document viewer.java.lang.String
getIdentifier()
Returns a unique identifier of the SigningDevice.SigningDeviceInfo
getInfo(java.util.Locale locale)
DocumentRenderer
getRenderer()
Gets the renderer.Signer
getSigner()
Gets the signer.java.awt.image.BufferedImage
getSignImage()
java.util.concurrent.ExecutorService
getThreadExecuter()
boolean
isGeneration(int generation)
protected void
registerHandlers()
Register handlers.void
send(BaseMessage message)
Send the givenBaseMessage
instance to the device.void
setBioData(com.stepover.opensignatureapi.jna.sopad.BioData bioData)
void
setDocumentViewer(AbstractDocumentViewer viewer)
Sets the document viewer.void
setIdentifier(java.lang.String identifier)
Sets the identifier.void
setRenderer(DocumentRenderer documentRenderer)
Sets the renderer.static void
sleep(long millis)
Sleep.
-
-
-
Field Detail
-
identifier
protected java.lang.String identifier
The identifier.
-
capabilities
protected SoSigningDeviceCapabilities capabilities
The capabilities.
-
configuration
protected SoDeviceConfiguration configuration
The configuration.
-
signer
protected Signer signer
The signer
-
documentRenderer
protected DocumentRenderer documentRenderer
The document renderer
-
log
protected static java.util.logging.Logger log
The log.
-
documentViewer
protected AbstractDocumentViewer documentViewer
The document viewer.
-
bioData
protected com.stepover.opensignatureapi.jna.sopad.BioData bioData
The bio data.
-
threads
public static java.util.Vector<java.lang.Thread> threads
keep track of threads
-
signingDeviceInfo
protected SoSigningDeviceInfo signingDeviceInfo
-
GEN12
public static final int GEN12
- See Also:
- Constant Field Values
-
GEN13
public static final int GEN13
- See Also:
- Constant Field Values
-
-
Method Detail
-
getCapabilities
public SoSigningDeviceCapabilities getCapabilities()
Description copied from interface:SigningDevice
Returns the device capabilities.- Specified by:
getCapabilities
in interfaceSigningDevice
- Returns:
-
setIdentifier
public void setIdentifier(java.lang.String identifier)
Sets the identifier.- Parameters:
identifier
- the new identifier
-
getIdentifier
public java.lang.String getIdentifier()
Description copied from interface:SigningDevice
Returns a unique identifier of the SigningDevice. TheSignatureServiceProvider
implementation has to ensure that all theSigningDevice
s it returns have a unique identifier. Identifiers forSigningDevice
s coming from differentSignatureServiceProvider
s might have overlapping identifiers.- Specified by:
getIdentifier
in interfaceSigningDevice
- Returns:
-
getInfo
public SigningDeviceInfo getInfo(java.util.Locale locale)
- Specified by:
getInfo
in interfaceSigningDevice
- Parameters:
locale
- the locale in which theSigningDeviceInfo
shall be returned. Iflocale
isnull
,Locale.getDefault()
shall be used. If there is no matching translation is available, the implementation shall use the closest substitute. How a substitute is selected is up to the implementation. We encourage to follow the guidelines ofResourceBundle
.
-
send
public void send(BaseMessage message) throws SigningDevice.UnsupportedMessageException
Description copied from interface:SigningDevice
Send the givenBaseMessage
instance to the device. Somemessages
might require replies. Receiving replies may be achieved by sending messages extendingReplyableMessage
.- Specified by:
send
in interfaceMessageReceiver
- Specified by:
send
in interfaceSigningDevice
- Parameters:
message
- themessage
to be sent- Throws:
SigningDevice.UnsupportedMessageException
- if themessage
is unsupported. Whether amessage
is supported or not, may be checked usinggetCapabilities()
.isMessageSupported(Class)
-
close
public void close()
- Specified by:
close
in interfaceSigningDevice
-
registerHandlers
protected void registerHandlers()
Register handlers.
-
getSigner
public Signer getSigner()
Gets the signer.- Returns:
- the signer
-
getConfiguration
public SoDeviceConfiguration getConfiguration()
Gets the configuration.- Returns:
- the configuration
-
getRenderer
public DocumentRenderer getRenderer()
Gets the renderer.- Returns:
- the renderer
-
setRenderer
public void setRenderer(DocumentRenderer documentRenderer)
Sets the renderer.- Parameters:
documentRenderer
- the new renderer
-
setDocumentViewer
public void setDocumentViewer(AbstractDocumentViewer viewer)
Sets the document viewer.- Parameters:
viewer
- the new document viewer
-
getDocumentViewer
public AbstractDocumentViewer getDocumentViewer()
Gets the document viewer.- Returns:
- the document viewer
-
getBioData
public com.stepover.opensignatureapi.jna.sopad.BioData getBioData()
-
setBioData
public void setBioData(com.stepover.opensignatureapi.jna.sopad.BioData bioData)
-
sleep
public static void sleep(long millis)
Sleep.- Parameters:
millis
- the millis
-
isGeneration
public boolean isGeneration(int generation)
-
getSignImage
public java.awt.image.BufferedImage getSignImage()
-
getThreadExecuter
public java.util.concurrent.ExecutorService getThreadExecuter()
-
-