|
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 | +--com.ibm.mqe.adapters.MQeDiskFieldsAdapter | +--com.ibm.mqe.adapters.MQeMirroredDiskFieldsAdapter
This extension of the standard MQe disk adapter,
com.ibm.mqe.adapters.MQeDiskFieldsAdapter
, duplicates all
function found in the writeObject()
method of that
class, but replaces the standard Java I/O operations with native 4690
mirrored file operations using the com.ibm.OS4690.POSFile
class.
The default implementation creates a mirrored file that is distributed on close, and whose writes are flushed immediately. Finally, a full close is performed.
Field Summary |
Fields inherited from class com.ibm.mqe.MQeAdapter |
MQe_Adapter_BYTECOUNTS, MQe_Adapter_EXISTS, MQe_Adapter_FILENAME, MQe_Adapter_FILTER, MQe_Adapter_LIST, MQe_Adapter_READ, MQe_Adapter_RENAME, MQe_Adapter_RETRIES, MQe_Adapter_UPDATE, MQe_Adapter_WRITE |
Constructor Summary | |
MQeMirroredDiskFieldsAdapter()
|
Method Summary | |
void |
activate(java.lang.String fileDesc,
java.lang.Object param,
java.lang.Object options,
int lrecl,
int noRec)
Calls the base class activate . |
void |
erase(java.lang.Object opt)
Calls the base class erase . |
java.lang.String[] |
listMatchingFiles()
Returns a list of files matching the filter held by this adapter. |
java.lang.Object |
readObject(java.lang.Object obj)
Duplicates the behavior of the base class readObject . |
void |
writeObject(java.lang.Object opt,
java.lang.Object data)
Writes an MQeFields object to disk. |
Methods inherited from class com.ibm.mqe.adapters.MQeDiskFieldsAdapter |
close, control, open, status |
Methods inherited from class com.ibm.mqe.MQeAdapter |
read |
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 |
Constructor Detail |
public MQeMirroredDiskFieldsAdapter()
Method Detail |
public void writeObject(java.lang.Object opt, java.lang.Object data) throws java.lang.Exception
Note: Overides the base class by writing to a 4690 POSFile
writeObject
in class MQeDiskFieldsAdapter
opt
- Object not used.data
- Object MQeFields object to dump to disk.
java.lang.Exception
java.lang.Exception
- Usage Example :
mydfa.writeObject(null,myMQeFields);public java.lang.String[] listMatchingFiles()
filePath
and filter
.
Note: This method is case-insensitive to accomodate 4690 Java
public void activate(java.lang.String fileDesc, java.lang.Object param, java.lang.Object options, int lrecl, int noRec) throws java.lang.Exception
activate
.
activate
in class MQeDiskFieldsAdapter
fileDesc
- A String containing the name of this adapter,
or its' alias, followed by a colon, followed by the directory path to be opened.
Note: If you want to open a file the name of the file
will be specified on the open. Just the path to the file here.param
- Object that sets the adapter's parameter value.
Can supply an MQeAttribute object here that will cause the data
to be encoded on disk.options
- Object, A String that specifies the open options:
MQe_Adapter_READ - read the file MQe_Adapter_WRITE - write the file MQe_Adapter_UPDATE - read and write the file
lrecl
- Not used.
java.lang.Exception
- Usage Example :
mydfa.activate("./mydir/mysubdir",null,MQe.MQeAdapter_READ,0,0);MQeDiskFieldsAdapter.readObject(java.lang.Object)
,
MQeDiskFieldsAdapter.writeObject(java.lang.Object, java.lang.Object)
public void erase(java.lang.Object opt) throws java.lang.Exception
erase
.
erase
in class MQeDiskFieldsAdapter
opt
- Object String that contains the file name to be deleted.
Note: Before passing to the OS's delete routine, the file name is
appended to the current FileDesc value.
java.lang.Exception
- Usage Example :
mydfa.erase("myfile.txt");public java.lang.Object readObject(java.lang.Object obj) throws java.lang.Exception
readObject
.
If the object specified as an argument is an MQeFields
object, the base class is called directly. Otherwise, the data
originates from a POSFile which is handled internally.
readObject
in class MQeDiskFieldsAdapter
obj
- Object MQeFields object that can be used to
provide a filter within the directory object. Otherwise null.
java.lang.Exception
- Usage Example :
MQeFields myFields =(MQeFields)mydfa.readObject(null);
|
Websphere MQ Everyplace | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |