|
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.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 CBTF and JavaBeans event mechanism.
Notice: Some knowledge of the WOSA/XFS API is required in order to use this service.
Service
,
Serialized FormField 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 CBTF event. |
void |
handleDevEvt(WOSADevEvent ev)
Handles a device event from a JavaBean event source and signals a CBTF 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 toolkit 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 |
Methods inherited from interface com.ibm.dse.base.Externalizable |
---|
getName, setName |
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()
cancelCmd
in interface WOSADeviceServiceInterface
public WOSAResult cancelCmd(int requestID)
cancelCmd
in interface WOSADeviceServiceInterface
requestID
- the requestID of a previous uncompleted request
public int cleanup()
cleanup
in interface WOSADeviceServiceInterface
public WOSAResult close()
close
in interface WOSADeviceServiceInterface
public WOSAResult execute(WOSAMessageRequest cmd)
execute
in interface WOSADeviceServiceInterface
cmd
- command request object, service dependant
protected void fireHandleCmd(WOSACmdEvent event)
event
- WOSACmdEventprotected void fireHandleDevEvt(WOSADevEvent event)
event
- WOSADevEventpublic java.lang.String getDeviceType()
public WOSAResult getInfo(WOSAMessageRequest info)
getInfo
in interface WOSADeviceServiceInterface
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)
handleCmd
in interface WOSACmdListener
ev
- WOSACmdEventpublic void handleDevEvt(WOSADevEvent ev)
handleDevEvt
in interface WOSADevListener
ev
- WOSADevEventprotected void initDefaults()
public java.lang.Object initializeFrom(Tag aTag) throws java.io.IOException
initializeFrom
in interface Externalizable
initializeFrom
in class Service
aTag
- com.ibm.dse.base.Tag
java.io.IOException
- thrown when an IO exception happenspublic WOSAResult lock()
lock
in interface WOSADeviceServiceInterface
public WOSAResult open()
open
in interface WOSADeviceServiceInterface
public void removeWOSACmdListener(WOSACmdListener newListener)
newListener
- WOSACmdListenerpublic void removeWOSADevListener(WOSADevListener newListener)
newListener
- WOSADevListenerpublic void run()
run
in interface java.lang.Runnable
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
- Stringpublic void setTimeout(java.lang.String t) throws java.lang.NumberFormatException
t
- String
java.lang.NumberFormatException
public void setWosaTraceLevel(java.lang.String l) throws java.lang.NumberFormatException
l
- String
java.lang.NumberFormatException
public int startup() throws DSEDLLNotFoundException
startup
in interface WOSADeviceServiceInterface
DSEDLLNotFoundException
- thrown when the DLL with the native code cannot be loadedpublic java.lang.String toString()
toString
in class Service
protected void trace(java.lang.String s)
s
- Stringpublic WOSAResult unlock()
unlock
in interface WOSADeviceServiceInterface
|
IBM Branch Transformation Toolkit Javadoc | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |