examples.adapters
Class WESAuthenticationGUIAdapter
java.lang.Object
|
+--com.ibm.mqe.adapters.MQeCommunicationsAdapter
|
+--com.ibm.mqe.adapters.MQeTcpipAdapter
|
+--com.ibm.mqe.adapters.MQeWESAuthenticationAdapter
|
+--examples.adapters.WESAuthenticationGUIAdapter
- public class WESAuthenticationGUIAdapter
- extends MQeWESAuthenticationAdapter
WESAuthenticationGUIAdapter extends the MQeWESAuthenticationdapter by popping up
a dialog box whenever authentication is required. (i.e. on the first write,
or if the last write failed due to an authentication failure).
The user can then click on 'OK' if he/she wishes to continue the request
with the credentials supplied, or 'Cancel' if he/she wishes to, errr..
cancel the operation.
- See Also:
MQeWESAuthenticationAdapter
Field Summary |
static short[] |
version
Version string |
Fields inherited from class com.ibm.mqe.adapters.MQeCommunicationsAdapter |
COMMS_ADAPTER_ADDRESS, COMMS_ADAPTER_CLASS, COMMS_ADAPTER_GROUP_SIZE, COMMS_ADAPTER_HTTP_VERSION, COMMS_ADAPTER_LISTEN, COMMS_ADAPTER_NONBLOCKING_TIMEOUT, COMMS_ADAPTER_NOPERSIST, COMMS_ADAPTER_PERSIST, COMMS_ADAPTER_PKTSIZE, COMMS_ADAPTER_PORT, COMMS_ADAPTER_RETRIES, COMMS_ADAPTER_SERVLET, COMMS_ADAPTER_TIMEOUT, COMMS_ADAPTER_VARIANCE, listeningAdapter, persistentAdapter, responderAdapter |
Method Summary |
byte[] |
read()
Intercept any data coming back from WES on a read(). |
void |
write(java.lang.Object opt,
int recordSize,
byte[] data)
Intercept any calls to the write() method, in order to
pop up the dialog box if required. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
version
public static short[] version
- Version string
WESAuthenticationGUIAdapter
public WESAuthenticationGUIAdapter()
write
public void write(java.lang.Object opt,
int recordSize,
byte[] data)
throws java.lang.Exception
- Intercept any calls to the write() method, in order to
pop up the dialog box if required. If the user clicks on
the cancel button in the dialog box, then don't do
the write.
- Parameters:
opt
- Options to supply to the write()recordSize
- the number of bytes to write
- Returns:
- void
- Throws:
MQeException
- - Except_Stopped if user wants to
cancel the operation, or another MQeException if the
underlying write fails.
java.lang.Exception
read
public byte[] read()
throws java.lang.Exception
- Intercept any data coming back from WES on a read().
Look to see if the read was accepted by the server.
If not, check to see if it was because our authentication
was invalid. If so, we need to redisplay the dialog box
on the next write.
- Overrides:
read
in class MQeWESAuthenticationAdapter
- Returns:
- byte[] The data read from the adapter
- Throws:
java.lang.Exception
- If the adapter read failed
java.lang.Exception