Package org.jopensignature.sign
Interface SigningDevice
-
- All Known Implementing Classes:
NativeColorDevice,NativeDevice,NativeG12Device,NativeG13Device,NativeMonochromeDevice,SoHeadlessSigningDevice,SoSigningDevice
public interface SigningDeviceRepresentation of a typically physical signing device.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classSigningDevice.UnsupportedMessageExceptionIndicates a unsupportedmessagesent usingsend(BaseMessage).
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidclose()SigningDeviceCapabilitiesgetCapabilities()Returns the device capabilities.java.lang.StringgetIdentifier()Returns a unique identifier of the SigningDevice.SigningDeviceInfogetInfo(java.util.Locale locale)voidsend(BaseMessage message)Send the givenBaseMessageinstance to the device.
-
-
-
Method Detail
-
getCapabilities
SigningDeviceCapabilities getCapabilities()
Returns the device capabilities.- Returns:
-
getIdentifier
java.lang.String getIdentifier()
Returns 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.- Returns:
-
getInfo
SigningDeviceInfo getInfo(java.util.Locale locale)
- 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
void send(BaseMessage message) throws SigningDevice.UnsupportedMessageException
Send the givenBaseMessageinstance to the device. Somemessagesmight require replies. Receiving replies may be achieved by sending messages extendingReplyableMessage.- Parameters:
message- themessageto be sent- Throws:
java.lang.IllegalArgumentException- ifmessageisnull.SigningDevice.UnsupportedMessageException- if themessageis unsupported. Whether amessageis supported or not, may be checked usinggetCapabilities().isMessageSupported(Class)
-
close
void close()
-
-