|
Websphere MQ Everyplace | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.mqe.MQe | +--com.ibm.mqe.MQeAdapter
This is the base class that provides the generic adapter features. It provides implementations for all methods that adapters could call. Any new adapters must inherit from MQeAdapter.
The default action is to throw an "unsupported" exception.
This class is a descendant of MQe
class.
Field Summary | |
static java.lang.String |
MQe_Adapter_BYTECOUNTS
An option that may be used when calling the status method. |
static java.lang.String |
MQe_Adapter_EXISTS
MQe_Adapter_EXISTS is used when calling the control method in order to ascertain if a particular file already exists. |
static java.lang.String |
MQe_Adapter_FILENAME
MQe_Adapter_FILENAME is used when calling the control method in order to obtain the current file name being operated on by that storage adapter. |
static java.lang.String |
MQe_Adapter_FILTER
MQe_Adapter_FILTER is used when calling the control method in order to set the current filter being used by that storage adapter. |
static java.lang.String |
MQe_Adapter_LIST
MQe_Adapter_LIST is used when calling the control method in order to obtain a list of files from the directory for this storage adapter. |
static java.lang.String |
MQe_Adapter_READ
MQe_Adapter_READ is used to set the file attributes in a storage adapter by passing this option in on the activate method |
static java.lang.String |
MQe_Adapter_RENAME
MQe_Adapter_RENAME is used when calling the control method in order to rename a file to the name contained in the storage adapter as currently set by the MQe_Adapter_FILTER. |
static java.lang.String |
MQe_Adapter_RETRIES
MQe_Adapter_RETRIES is used when activating a storage adapter to indicate the number of times the adapter should attempt to access a file before giving up. |
static java.lang.String |
MQe_Adapter_UPDATE
MQe_Adapter_UPDATE is used to set the file attributes in a storage adapter by passing this option in on the activate method |
static java.lang.String |
MQe_Adapter_WRITE
MQe_Adapter_WRITE is used to set the file attributes in a storage adapter by passing this option in on the activate method |
Constructor Summary | |
MQeAdapter()
|
Method Summary | |
void |
activate(java.lang.String file,
java.lang.Object param,
java.lang.Object option,
int notUsed1,
int notUsed2)
Used to activate an adapter. |
void |
close(java.lang.Object option)
Closes an adapter. |
java.lang.Object |
control(java.lang.Object option,
java.lang.Object ctrlObj)
Modifies the behaviour of the adapter. |
void |
open(java.lang.Object option)
Opens an adapter for use. |
byte[] |
read(java.lang.Object option,
int value0)
Reads data from the adapter. |
java.lang.Object |
readObject(java.lang.Object option)
Reads an object from the adapter. |
void |
writeObject(java.lang.Object option,
java.lang.Object data)
Writes an object to the adapter stream. |
Methods inherited from class com.ibm.mqe.MQe |
abbreviate, alias, asciiToByte, byteToAscii, byteToHex, byteToHex, byteToInt, byteToLong, byteToShort, byteToUnicode, fileSeparator, getEventLogHandler, hexToAscii, hexToByte, intToByte, isCLDC, loadClass, loadObject, log, setEventLogHandler, setLoader, sliceByteArray, type, unicodeToByte, uniqueValue |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String MQe_Adapter_FILENAME
public static final java.lang.String MQe_Adapter_FILTER
public static final java.lang.String MQe_Adapter_LIST
public static final java.lang.String MQe_Adapter_EXISTS
public static final java.lang.String MQe_Adapter_RENAME
public static final java.lang.String MQe_Adapter_BYTECOUNTS
public static final java.lang.String MQe_Adapter_READ
public static final java.lang.String MQe_Adapter_UPDATE
public static final java.lang.String MQe_Adapter_WRITE
public static final java.lang.String MQe_Adapter_RETRIES
Constructor Detail |
public MQeAdapter()
Method Detail |
public void activate(java.lang.String file, java.lang.Object param, java.lang.Object option, int notUsed1, int notUsed2) throws java.lang.Exception
Used to activate an adapter. Should only ever be called once in the life-time of the object.
Note : This entry point is meant to be used by the WebSphere MQ Everyplace object library not by application programs.
file
- String containing the file description ('fileid').
e.g. for network adapters this may be the IP address.param
- Object containing any required parameters of the
adapter. e.g. an MQeAttribute for a file store adapter.option
- Object containing any objects (e.g. PERSIST,
HISTORY)
java.lang.Exception
- - Does not throw anything.public void close(java.lang.Object option) throws java.lang.Exception
Closes an adapter.
The MQeAdapter base class throws a "not supported" exception. New adapters should override this method if appropriate.
Note: This entry point is meant to be used by the WebSphere MQ Everyplace object library not by application programs.
option
- Any options for the adapter, or null.
MQeException
- - MQe.Except_NotSupported.
java.lang.Exception
public java.lang.Object control(java.lang.Object option, java.lang.Object ctrlObj) throws java.lang.Exception
Modifies the behaviour of the adapter.
The MQeAdapter base class throws a "not supported" exception. New adapters should override this method if appropriate.
This class supplies two operations: Option = MQe.MQe_Adapter_GETPERSIST : Returns any persistent object. member variable associated with this adapter. Option = MQe.MQe_Adapter_PERSIST : Stores away a persistent object. member variable, and returns the previous one.
option
- Object containing the operation(s) to perform or null.ctrlObj
- Object used by the adapter for the control.(specific to
each adapter type)
MQeException
- - MQe.Except_NotSupported.
java.lang.Exception
public void open(java.lang.Object option) throws java.lang.Exception
Opens an adapter for use.
This method is used to bind to a file through the adapter.
The MQeAdapter base class throws a "not supported" exception. New adapters should override this method if appropriate.
Note : This entry point is meant to be used by the WebSphere MQ Everyplace object library not by application programs.
option
- Any options for the adapter, or null.
MQeException
- MQe.Except_NotSupported.
java.lang.Exception
public byte[] read(java.lang.Object option, int value0) throws java.lang.Exception
Reads data from the adapter.
This method is used to read a record from the specified file.
The MQeAdapter base class throws a "not supported" exception. New adapters should override this method if appropriate.
Note : This entry point is meant to be used by the WebSphere MQ Everyplace object library not by application programs.
option
- Any options for the adapter, or null.value0
- The record number to be written or -1
MQeException
- MQe.Except_NotSupported.
java.lang.Exception
public java.lang.Object readObject(java.lang.Object option) throws java.lang.Exception
Reads an object from the adapter.
This method is used to read an Object from the specified file.
The MQeAdapter base class throws a "not supported" exception. New adapters should override this method if appropriate.
Note : This entry point is meant to be used by the WebSphere MQ Everyplace object library not by application programs.
option
- Any options for the adapter, or null.
MQeException
- MQe.Except_NotSupported.
java.lang.Exception
public void writeObject(java.lang.Object option, java.lang.Object data) throws java.lang.Exception
Writes an object to the adapter stream.
This method is used to write an Object to the specified file.
The MQeAdapter base class throws a "not supported" exception. New adapters should override this method if appropriate.
Note : This entry point is meant to be used by the WebSphere MQ Everyplace object library not by application programs.
data
- An Object containing the data to be written.
MQeException
- - MQe.Except_NotSupported.
java.lang.Exception
|
Websphere MQ Everyplace | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |