|
IBM Branch Transformation Toolkit Javadoc | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.dse.wosabean.WOSADeviceBean
This is the WOSA Services base class. It interfaces with WOSA/XFS (WOSA for short) via JNI, providing a subset of the WOSA asynchronous functions. The WOSA calls are issued in the caller thread, and any WOSA message is signalled by a waiting thread, using JavaBeans event mechanism.
Service
Field Summary | |
---|---|
protected WOSACmdListener |
aWOSACmdListener
|
protected WOSADevListener |
aWOSADevListener
|
WOSACmdEvent |
lastCmdEvent
Public variables used by the synchronous utilities |
WOSAResult |
lastResult
Holds last 'command complete event' |
protected java.lang.Thread |
messageThread
The thread that waits for Windows/PM WOSA messages |
Constructor Summary | |
---|---|
WOSADeviceBean()
This constructor creates a WOSADeviceBean object. |
Method Summary | |
---|---|
void |
addWOSACmdListener(WOSACmdListener newListener)
|
void |
addWOSADevListener(WOSADevListener newListener)
|
WOSAResult |
cancelCmd()
Cancels all outstanding requests |
WOSAResult |
cancelCmd(int requestID)
Cancels a request |
int |
cleanup()
Destroys the message thread and performs WOSA cleanup |
WOSAResult |
close()
Closes a WOSA device |
boolean |
closeSync()
|
WOSAResult |
execute(WOSAMessageRequest cmd,
int timeout)
Executes a WOSA service command |
boolean |
executeSync(WOSAMessageRequest cmd,
int timeout)
|
protected void |
fireHandleCmd(WOSACmdEvent event)
Supports listener events. |
protected void |
fireHandleDevEvt(WOSADevEvent event)
Supports listener events. |
boolean |
getConsoleTrace()
Gets the externalizable parameter consoleTrace |
java.lang.String |
getDeviceType()
Gets the externalizable parameter deviceType |
WOSAResult |
getInfo(WOSAMessageRequest info,
int timeout)
Queries device information |
boolean |
getInfoSync(WOSAMessageRequest info,
int timeout)
|
java.lang.String |
getLogicalName()
Gets the externalizable parameter logicalName |
java.lang.String |
getSPMMaxVersion()
Gets the externalizable parameter SPMMaxVersion |
java.lang.String |
getSPMMinVersion()
Gets the externalizable parameter SPMMinVersion |
java.lang.String |
getWosaTraceLevel()
Gets the externalizable parameter wosaTraceLevel |
WOSAResult |
lock(int timeout)
Locks the device for exclusive access |
boolean |
lockSync(int timeout)
|
WOSAResult |
open(int timeout)
Opens a WOSA device |
boolean |
openSync(int timeout)
|
void |
removeWOSACmdListener(WOSACmdListener newListener)
|
void |
removeWOSADevListener(WOSADevListener newListener)
|
void |
run()
The WOSA message loop, runs in a separate thread |
void |
setConsoleTrace(boolean traceOn)
Setter for the externalizable parameter consoleTrace |
void |
setDeviceType(java.lang.String n)
Sets the externalizable parameter deviceType |
void |
setLogicalName(java.lang.String ln)
Sets the externalizable parameter logicalName |
void |
setSPMMaxVersion(java.lang.String mv)
Sets the externalizable parameter SPMMaxVersion |
void |
setSPMMinVersion(java.lang.String mv)
Sets the externalizable parameter SPMMinVersion |
void |
setWosaTraceLevel(java.lang.String l)
Sets for the externalizable parameter wosaTraceLevel |
int |
startup(int josaTrace)
Instance control and WOSA startup if first instance |
protected void |
trace(java.lang.String s)
Sends a string to a trace |
WOSAResult |
unlock()
Unlocks access to the device |
boolean |
unlockSync()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public WOSACmdEvent lastCmdEvent
public WOSAResult lastResult
protected java.lang.Thread messageThread
protected transient WOSACmdListener aWOSACmdListener
protected transient WOSADevListener aWOSADevListener
Constructor Detail |
public WOSADeviceBean()
Method Detail |
public void addWOSACmdListener(WOSACmdListener newListener)
newListener
- WOSACmdListenerpublic void addWOSADevListener(WOSADevListener newListener)
newListener
- WOSADevListenerpublic WOSAResult cancelCmd()
public WOSAResult cancelCmd(int requestID)
requestID
- The requestID of a previous uncompleted requestpublic int cleanup()
public WOSAResult close()
public boolean closeSync()
public WOSAResult execute(WOSAMessageRequest cmd, int timeout)
cmd
- command request object, service dependantpublic boolean executeSync(WOSAMessageRequest cmd, int timeout)
protected void fireHandleCmd(WOSACmdEvent event)
event
- WOSACmdEventprotected void fireHandleDevEvt(WOSADevEvent event)
event
- WOSADevEventpublic boolean getConsoleTrace()
public java.lang.String getDeviceType()
public WOSAResult getInfo(WOSAMessageRequest info, int timeout)
info
- information request object, service dependantpublic boolean getInfoSync(WOSAMessageRequest info, int timeout)
public java.lang.String getLogicalName()
public java.lang.String getSPMMaxVersion()
public java.lang.String getSPMMinVersion()
public java.lang.String getWosaTraceLevel()
public WOSAResult lock(int timeout)
public boolean lockSync(int timeout)
public WOSAResult open(int timeout)
public boolean openSync(int timeout)
public void removeWOSACmdListener(WOSACmdListener newListener)
newListener
- WOSACmdListenerpublic void removeWOSADevListener(WOSADevListener newListener)
newListener
- WOSADevListenerpublic void run()
run
in interface java.lang.Runnable
public void setConsoleTrace(boolean traceOn)
public void setDeviceType(java.lang.String n)
public void setLogicalName(java.lang.String ln)
public void setSPMMaxVersion(java.lang.String mv)
public void setSPMMinVersion(java.lang.String mv)
public void setWosaTraceLevel(java.lang.String l) throws java.lang.NumberFormatException
java.lang.NumberFormatException
public int startup(int josaTrace) throws DSEDLLNotFoundException
DSEDLLNotFoundException
- thrown when the DLL with the native code cannot be loadedprotected void trace(java.lang.String s)
public WOSAResult unlock()
public boolean unlockSync()
|
IBM Branch Transformation Toolkit Javadoc | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |