|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--com.ibm.dse.base.DSENotifier
|
+--com.ibm.dse.base.Service
|
+--com.ibm.dse.services.wosa.WOSADeviceService
The WOSADeviceService class is the WOSA Services base class. It interfaces with theWOSA/XFS (WOSA for short) via JNI and provides a subset of the WOSA asynchronous functions. The WOSA calls are issued in the caller thread and are directly mapped to the WOSA layer through JNI. A WOSA message is signalled by a waiting thread by using both the Composer and JavaBeans event mechanism.
Notice: Some knowledge of the WOSA/XFS API is required in order to use this service.
Service, Serialized Form| Field Summary | |
protected WOSACmdListener |
aWOSACmdListener
|
protected WOSADevListener |
aWOSADevListener
|
java.lang.String |
COMPID
|
java.lang.String |
logicalName
Provides the WOSA service provider logical name |
protected java.lang.Thread |
messageThread
The thread that waits for Windows/PM WOSA messages |
int |
timeout
Provides the timeout in milliseconds for WOSA calls |
| Fields inherited from class com.ibm.dse.base.Service |
externalizer |
| Fields inherited from class com.ibm.dse.base.DSENotifier |
handlersList,
name |
| Constructor Summary | |
WOSADeviceService()
This constructor creates a WOSADeviceService object. |
|
| Method Summary | |
void |
addWOSACmdListener(WOSACmdListener newListener)
Adds a WOSA command listener. |
void |
addWOSADevListener(WOSADevListener newListener)
Adds a WOSA device listener. |
WOSAResult |
cancelCmd()
Cancels ALL outstanding requests. |
WOSAResult |
cancelCmd(int requestID)
Cancels a request. |
int |
cleanup()
Destroys the message thread. |
WOSAResult |
close()
Closes the WOSA device. |
WOSAResult |
execute(WOSAMessageRequest cmd)
Executes a WOSA service command. |
protected void |
fireHandleCmd(WOSACmdEvent event)
Supports listener events. |
protected void |
fireHandleDevEvt(WOSADevEvent event)
Supports listener events. |
java.lang.String |
getDeviceType()
Returns the externalizable parameter deviceType. |
WOSAResult |
getInfo(WOSAMessageRequest info)
Queries device information. |
java.lang.String |
getLogicalName()
Returns the externalizable parameter logicalName. |
java.lang.String |
getSPMMaxVersion()
Returns the externalizable parameter SPMMaxVersion. |
java.lang.String |
getSPMMinVersion()
Returns the externalizable parameter SPMMinVersion. |
java.lang.String |
getTimeout()
Returns the externalizable parameter timeout.. |
java.lang.String |
getWosaTraceLevel()
Returns the externalizable parameter wosaTraceLevel. |
void |
handleCmd(WOSACmdEvent ev)
Handles a command event from a JavaBean event source and signals a Composer event. |
void |
handleDevEvt(WOSADevEvent ev)
Handles a device event from a JavaBean event source and signals a Composer event. |
protected void |
initDefaults()
Initializes internal and externalizable variables. |
java.lang.Object |
initializeFrom(Tag aTag)
Initializes the service. |
WOSAResult |
lock()
Locks the device for exclusive access. |
WOSAResult |
open()
Opens a WOSA device. |
void |
removeWOSACmdListener(WOSACmdListener newListener)
Removes a WOSA command listener. |
void |
removeWOSADevListener(WOSADevListener newListener)
Removes a WOSA device listener. |
void |
run()
Provides the WOSA message loop. |
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 |
setTimeout(java.lang.String t)
Sets the externalizable parameter timeout. |
void |
setWosaTraceLevel(java.lang.String l)
Sets the externalizable parameter wosaTraceLevel. |
int |
startup()
Provides instance control and native code binding. |
java.lang.String |
toString()
Returns a visual representation of the WOSADeviceService service. |
protected void |
trace(java.lang.String s)
Sends a string to the framework trace facility. |
WOSAResult |
unlock()
Unlocks access to the device. |
| Methods inherited from class com.ibm.dse.base.Service |
externalizer,
getExternalizer,
getTagName,
readExternal,
readExternal,
readObject,
removeExternal,
setExternalizer,
terminate,
toStrings,
toTags,
writeExternal,
writeExternal |
| Methods inherited from class com.ibm.dse.base.DSENotifier |
addHandler,
getHandlersList,
getName,
removeHandler,
setName,
signalEvent,
signalEvent,
signalEvent |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
| Field Detail |
public int timeout
public java.lang.String logicalName
protected java.lang.Thread messageThread
protected transient WOSACmdListener aWOSACmdListener
protected transient WOSADevListener aWOSADevListener
public java.lang.String COMPID
| Constructor Detail |
public WOSADeviceService()
| 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 WOSAResult execute(WOSAMessageRequest cmd)
cmd - command request object, service dependantprotected void fireHandleCmd(WOSACmdEvent event)
event - WOSACmdEventprotected void fireHandleDevEvt(WOSADevEvent event)
event - WOSADevEventpublic java.lang.String getDeviceType()
public WOSAResult getInfo(WOSAMessageRequest info)
info - WOSAMessageRequest - information request object, service dependant.public java.lang.String getLogicalName()
public java.lang.String getSPMMaxVersion()
public java.lang.String getSPMMinVersion()
public java.lang.String getTimeout()
public java.lang.String getWosaTraceLevel()
public void handleCmd(WOSACmdEvent ev)
ev - WOSACmdEventpublic void handleDevEvt(WOSADevEvent ev)
ev - WOSADevEventprotected void initDefaults()
public java.lang.Object initializeFrom(Tag aTag)
throws java.io.IOException
aTag - com.ibm.dse.base.Tagpublic WOSAResult lock()
public WOSAResult open()
public void removeWOSACmdListener(WOSACmdListener newListener)
newListener - WOSACmdListenerpublic void removeWOSADevListener(WOSADevListener newListener)
newListener - WOSADevListenerpublic void run()
public void setDeviceType(java.lang.String n)
n - Stringpublic void setLogicalName(java.lang.String ln)
ln - Stringpublic void setSPMMaxVersion(java.lang.String mv)
mv - Stringpublic void setSPMMinVersion(java.lang.String mv)
mv - String
public void setTimeout(java.lang.String t)
throws java.lang.NumberFormatException
t - String
public void setWosaTraceLevel(java.lang.String l)
throws java.lang.NumberFormatException
l - String
public int startup()
throws DSEDLLNotFoundException
public java.lang.String toString()
protected void trace(java.lang.String s)
s - Stringpublic WOSAResult unlock()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||