001: package org.rextency.mq;
002:
003: import java.io.File;
004: import java.io.FileInputStream;
005: import java.io.IOException;
006: import java.util.HashSet;
007: import java.util.Set;
008: import java.util.regex.Matcher;
009: import java.util.regex.Pattern;
010:
011: import com.ibm.mq.*;
012:
013: /**
014: * An MQ message class
015: *
016: * @author Phillip Mayhew
017: * @version $Revision: 3298 $
018: */
019: public class MQMsg {
020:
021: private static Pattern s_pathParser = Pattern
022: .compile("([^?#]*)(\\?([^#]*))?(#(.*))?");
023:
024: private String ReplyQueue;
025: private String ReplyToQueue;
026: private String RequestQueue;
027: private String QueueManager;
028: private String ReplyToQueueManager;
029: private String Message;
030: private String CorrelationID;
031:
032: private int ReadOptions = MQC.MQOO_INPUT_AS_Q_DEF;
033: private int OpenOptions = MQC.MQOO_OUTPUT;
034:
035: public MQMsg() {
036: }
037:
038: public void setCorrelationID(String pCorrelation_ID) {
039: this .CorrelationID = pCorrelation_ID;
040: }
041:
042: public String getCorrelationID() {
043: return this .CorrelationID;
044: }
045:
046: public void setReadOptions(int pRead_Options) {
047: this .ReadOptions = pRead_Options;
048: }
049:
050: public void setOpenOptions(int pOpen_Options) {
051: this .OpenOptions = pOpen_Options;
052: }
053:
054: public int getReadOptions() {
055: return this .ReadOptions;
056: }
057:
058: public int getOpenOptions() {
059: return this .OpenOptions;
060: }
061:
062: public void setReplyQueue(String pReply_Queue) {
063: this .ReplyQueue = pReply_Queue;
064: }
065:
066: public void setReplyToQueue(String pReply_To_Queue) {
067: this .ReplyToQueue = pReply_To_Queue;
068: }
069:
070: public void setReplyToQueueManager(String pReply_To_Queue_Manager) {
071: this .ReplyToQueueManager = pReply_To_Queue_Manager;
072: }
073:
074: public void setRequestQueue(String pRequest_Queue) {
075: this .RequestQueue = pRequest_Queue;
076: }
077:
078: public void setQueueManager(String pQueue_Manager) {
079: this .QueueManager = pQueue_Manager;
080: }
081:
082: public void setMessage(String pMessage) {
083: this .Message = pMessage;
084: }
085:
086: public String getReplyQueue() {
087: return this .ReplyQueue;
088: }
089:
090: public String getReplyToQueue() {
091: return this .ReplyToQueue;
092: }
093:
094: public String getReplyToQueueManager() {
095: return this .ReplyToQueueManager;
096: }
097:
098: public String getRequestQueue() {
099: return this .RequestQueue;
100: }
101:
102: public String getQueueManager() {
103: return this .QueueManager;
104: }
105:
106: public String getMessage() {
107: return this .Message;
108: }
109:
110: public String toString() {
111: final StringBuffer result = new StringBuffer("MQMessage");
112:
113: return result.toString();
114: }
115:
116: }
|