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.BioDatabioDataThe bio data.protected SoSigningDeviceCapabilitiescapabilitiesThe capabilities.protected SoDeviceConfigurationconfigurationThe configuration.protected DocumentRendererdocumentRendererThe document rendererprotected AbstractDocumentViewerdocumentViewerThe document viewer.static intGEN12static intGEN13protected java.lang.StringidentifierThe identifier.protected static java.util.logging.LoggerlogThe log.protected SignersignerThe signerprotected SoSigningDeviceInfosigningDeviceInfostatic java.util.Vector<java.lang.Thread>threadskeep 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 voidclose()com.stepover.opensignatureapi.jna.sopad.BioDatagetBioData()SoSigningDeviceCapabilitiesgetCapabilities()Returns the device capabilities.SoDeviceConfigurationgetConfiguration()Gets the configuration.AbstractDocumentViewergetDocumentViewer()Gets the document viewer.java.lang.StringgetIdentifier()Returns a unique identifier of the SigningDevice.SigningDeviceInfogetInfo(java.util.Locale locale)DocumentRenderergetRenderer()Gets the renderer.SignergetSigner()Gets the signer.java.awt.image.BufferedImagegetSignImage()java.util.concurrent.ExecutorServicegetThreadExecuter()booleanisGeneration(int generation)protected voidregisterHandlers()Register handlers.voidsend(BaseMessage message)Send the givenBaseMessageinstance to the device.voidsetBioData(com.stepover.opensignatureapi.jna.sopad.BioData bioData)voidsetDocumentViewer(AbstractDocumentViewer viewer)Sets the document viewer.voidsetIdentifier(java.lang.String identifier)Sets the identifier.voidsetRenderer(DocumentRenderer documentRenderer)Sets the renderer.static voidsleep(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:SigningDeviceReturns the device capabilities.- Specified by:
getCapabilitiesin 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:SigningDeviceReturns a unique identifier of the SigningDevice. TheSignatureServiceProviderimplementation has to ensure that all theSigningDevices it returns have a unique identifier. Identifiers forSigningDevices coming from differentSignatureServiceProviders might have overlapping identifiers.- Specified by:
getIdentifierin interfaceSigningDevice- Returns:
-
getInfo
public SigningDeviceInfo getInfo(java.util.Locale locale)
- Specified by:
getInfoin interfaceSigningDevice- Parameters:
locale- the locale in which theSigningDeviceInfoshall be returned. Iflocaleisnull,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:SigningDeviceSend the givenBaseMessageinstance to the device. Somemessagesmight require replies. Receiving replies may be achieved by sending messages extendingReplyableMessage.- Specified by:
sendin interfaceMessageReceiver- Specified by:
sendin interfaceSigningDevice- Parameters:
message- themessageto be sent- Throws:
SigningDevice.UnsupportedMessageException- if themessageis unsupported. Whether amessageis supported or not, may be checked usinggetCapabilities().isMessageSupported(Class)
-
close
public void close()
- Specified by:
closein 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()
-
-