001: /*
002: * Copyright 2005-2006 The Kuali Foundation.
003: *
004: *
005: * Licensed under the Educational Community License, Version 1.0 (the "License"); you may not use this file except in
006: * compliance with the License. You may obtain a copy of the License at
007: *
008: * http://www.opensource.org/licenses/ecl1.php
009: *
010: * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS
011: * IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific
012: * language governing permissions and limitations under the License.
013: */
014: package edu.iu.uis.eden.messaging;
015:
016: import java.io.Serializable;
017: import java.sql.Timestamp;
018:
019: import org.kuali.bus.services.KSBServiceLocator;
020:
021: /**
022: * A message which has been persisted to the data store.
023: *
024: * @author Kuali Rice Team (kuali-rice@googlegroups.com)
025: */
026: public class PersistedMessage implements Serializable {
027:
028: private static final long serialVersionUID = -7047766894738304195L;
029:
030: private Long routeQueueId;
031: private Integer queuePriority;
032: private String queueStatus;
033: private Timestamp queueDate;
034: private Timestamp expirationDate;
035: private Integer retryCount;
036: private Integer lockVerNbr;
037: private String ipNumber;
038: private String serviceName;
039: private String messageEntity;
040: private String methodName;
041: private AsynchronousCall methodCall;
042: private PersistedMassagePayload payload;
043: private String value1;
044: private String value2;
045:
046: public PersistedMessage() {
047: // default constructor
048: }
049:
050: public String getMessageEntity() {
051: return this .messageEntity;
052: }
053:
054: public void setMessageEntity(String messageEntity) {
055: this .messageEntity = messageEntity;
056: }
057:
058: public String getIpNumber() {
059: return this .ipNumber;
060: }
061:
062: public void setIpNumber(String ipNumber) {
063: this .ipNumber = ipNumber;
064: }
065:
066: public Timestamp getQueueDate() {
067: return this .queueDate;
068: }
069:
070: public Integer getQueuePriority() {
071: return this .queuePriority;
072: }
073:
074: public String getQueueStatus() {
075: return this .queueStatus;
076: }
077:
078: public Integer getRetryCount() {
079: return this .retryCount;
080: }
081:
082: public void setQueueDate(Timestamp timestamp) {
083: this .queueDate = timestamp;
084: }
085:
086: public void setQueuePriority(Integer integer) {
087: this .queuePriority = integer;
088: }
089:
090: public void setQueueStatus(String string) {
091: this .queueStatus = string;
092: }
093:
094: public void setRetryCount(Integer integer) {
095: this .retryCount = integer;
096: }
097:
098: public Integer getLockVerNbr() {
099: return this .lockVerNbr;
100: }
101:
102: public void setLockVerNbr(Integer lockVerNbr) {
103: this .lockVerNbr = lockVerNbr;
104: }
105:
106: public Long getRouteQueueId() {
107: return this .routeQueueId;
108: }
109:
110: public void setRouteQueueId(Long queueSequence) {
111: this .routeQueueId = queueSequence;
112: }
113:
114: public String getServiceName() {
115: return this .serviceName;
116: }
117:
118: public void setServiceName(String serviceName) {
119: this .serviceName = serviceName;
120: }
121:
122: public String toString() {
123: return "[RouteQueue: " + ", routeQueueId=" + this .routeQueueId
124: + ", ipNumber=" + this .ipNumber + ", serviceName="
125: + this .serviceName + ", queueStatus="
126: + this .queueStatus + ", queuePriority="
127: + this .queuePriority + ", queueDate=" + this .queueDate
128: + "]";
129: }
130:
131: public AsynchronousCall getMethodCall() {
132: return this .methodCall;
133: }
134:
135: public void setMethodCall(AsynchronousCall methodCall) {
136: this .methodCall = methodCall;
137: }
138:
139: public String getMethodName() {
140: return this .methodName;
141: }
142:
143: public void setMethodName(String methodName) {
144: this .methodName = methodName;
145: }
146:
147: public Timestamp getExpirationDate() {
148: return this .expirationDate;
149: }
150:
151: public void setExpirationDate(Timestamp expirationDate) {
152: this .expirationDate = expirationDate;
153: }
154:
155: public PersistedMassagePayload getPayload() {
156: if (this .payload == null) {
157: if (this .getRouteQueueId() == null) {
158: return null;
159: }
160: this .payload = KSBServiceLocator.getRouteQueueService()
161: .findByPersistedMessageByRouteQueueId(
162: this .getRouteQueueId());
163: }
164: return this .payload;
165: }
166:
167: public void setPayload(PersistedMassagePayload payload) {
168: this .payload = payload;
169: }
170:
171: public String getValue1() {
172: return this .value1;
173: }
174:
175: public void setValue1(String value1) {
176: this .value1 = value1;
177: }
178:
179: public String getValue2() {
180: return this .value2;
181: }
182:
183: public void setValue2(String value2) {
184: this.value2 = value2;
185: }
186:
187: }
|