|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.businesslink.sgi.api.hsm.HsmServer
Abstract superclass for all HSM servers. The simplest HSM server must implement four methods: 1) a default constructor (which must call the super constructor), 2) startHsmServer, 3) processHsmRequest, and 4) endHsmServer. The lifetime of most HSM servers will be spent waiting for processHsmRequest to be invoked by the HSM support layer.
Fields inherited from interface com.businesslink.sgi.api.hsm.HsmConstants |
CCS_ASCII,
CCS_HEX,
CCS_JOB,
CCS_MSG,
CCS_STRATEGI,
CCS_UNICODE,
CCS_USEBC,
CCS_UTF8,
HSM_CLC_LOCAL,
HSM_CTP_CONTROL,
HSM_CTP_HSTUSR,
HSM_CTP_SERVER,
HSM_CTP_SGI,
HSM_OPC_ECHO,
HSM_OPC_ERROR,
HSM_OPC_NO_SVR,
HSM_OPC_PING,
HSM_OPC_STOP,
HSM_OPC_STOPPED,
HSM_OPC_TIMEOUT,
HSM_OPC_WRTPFR,
HSM_OPT_AUTIDN,
HSM_OPT_AUTTYP,
HSM_OPT_CLTLOC,
HSM_OPT_CUR,
HSM_OPT_HEX,
HSM_OPT_JOB,
HSM_OPT_MSG,
HSM_OPT_RCVTMO,
HSM_OPT_RPYCCS,
HSM_OPT_RQSCCS,
HSM_OPT_SGI,
HSM_OPT_UNI,
HSM_OPT_USRATR,
HSM_UAT_NOTSET |
Constructor Summary | |
protected |
HsmServer(java.lang.String svrdsc)
Initializes the HSM server. |
Method Summary | |
abstract void |
endHsmServer()
Called by the HSM support layer when the HSM server is ending. |
protected HsmClientDetails |
getClientDetails()
Gets details about the client making the HSM request (valid only during a HSM transaction). |
protected java.io.PrintWriter |
getTextWriter()
Gets a PrintWriter for debug/status messages. |
protected java.io.PrintWriter |
getTextWriter(java.lang.String svrnam)
Deprecated. As of Strategi V1R9M0 it is no longer necessary to pass the server name as an argument Gets a PrintWriter for debug/status messages. |
static void |
main(java.lang.String[] args)
Loads the HSM implementation and starts the HSM server. |
abstract boolean |
processHsmRequest(HsmServerRequest svrrqs,
HsmClientDetails cltdtl)
Called by the HSM support layer whenever a server request has been received and is available for processing. |
protected boolean |
processHsmRequestDefault(HsmServerRequest svrrqs,
HsmClientDetails cltdtl)
Performs default HSM processing for system level opcodes and unknown opcodes. |
void |
processRequests()
Processes HSM requests. |
HsmServerRequest |
receiveRequest()
Deprecated. As of Strategi V1R9M0 the Strategi HSM support layer provides a main() to allow the HsmServer to simply provide an implementation of startHsmServer(), processHsmRequest() and endHsmServer(). If a main() is used (and it should not be neccessary) then processRequests() should be used to begin dequeuing and processing requests (processRequests() will call startHsmServer() and endHsmServer()). |
void |
sendReply(HsmServerRequest svrrqs)
Deprecated. As of Strategi V1R9M0 the Strategi HSM support layer provides a main() to allow the HsmServer to simply provide an implementation of startHsmServer(), processHsmRequest() and endHsmServer(). If a main() is used (and it should not be neccessary) then processRequests() should be used to begin dequeuing and processing requests (processRequests() will call startHsmServer() and endHsmServer()). |
protected boolean |
setOption(java.lang.String kwd,
java.lang.String val)
Sets a particular HSM server option. |
abstract void |
startHsmServer(java.lang.String svrnam)
Called by the HSM support layer when the HSM server is starting. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
protected HsmServer(java.lang.String svrdsc)
svrdsc
- Server description text, used for replies to *PING opcode requests.Method Detail |
public abstract void startHsmServer(java.lang.String svrnam)
svrnam
- the name of this HSM server.public abstract boolean processHsmRequest(HsmServerRequest svrrqs, HsmClientDetails cltdtl)
svrrqs
- the object containing the request data; also used to set the reply data.cltdtl
- details about the client making the request.public abstract void endHsmServer()
protected final boolean setOption(java.lang.String kwd, java.lang.String val)
kwd
- keyword identifying the option to set.val
- value to set.protected final java.io.PrintWriter getTextWriter(java.lang.String svrnam)
svrnam
- the name of this HSM server (used to identify messages).protected final java.io.PrintWriter getTextWriter()
protected final HsmClientDetails getClientDetails()
protected final boolean processHsmRequestDefault(HsmServerRequest svrrqs, HsmClientDetails cltdtl)
public final void processRequests()
public HsmServerRequest receiveRequest()
public final void sendReply(HsmServerRequest svrrqs)
public static void main(java.lang.String[] args)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |