KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > scalagent > kjoram > Message


1 /*
2  * JORAM: Java(TM) Open Reliable Asynchronous Messaging
3  * Copyright (C) 2001 - ScalAgent Distributed Technologies
4  * Copyright (C) 1996 - Dyade
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
19  * USA.
20  *
21  * Initial developer(s): Frederic Maistre (INRIA)
22  * Contributor(s): Nicolas Tachker (ScalAgent)
23  */

24 package com.scalagent.kjoram;
25
26 import com.scalagent.kjoram.excepts.IllegalStateException;
27 import com.scalagent.kjoram.excepts.*;
28 import com.scalagent.kjoram.messages.*;
29
30 import java.util.*;
31
32 /**
33  * A Joram message wraps a proprietary MOM message which is actually the
34  * effective MOM transport facility for the JMS operations.
35  */

36 public class Message
37 {
38   /** The wrapped MOM message. */
39   protected com.scalagent.kjoram.messages.Message momMsg;
40   /**
41    * If the message is actually consumed, the session that consumes it,
42    * <code>null</code> otherwise.
43    */

44   protected Session sess = null;
45
46
47   /**
48    * Constructs a bright new <code>Message</code>.
49    */

50   Message()
51   {
52     momMsg = new com.scalagent.kjoram.messages.Message();
53   }
54
55   /**
56    * Constructs a <code>Message</code> wrapping a MOM message consumed by a
57    * session.
58    *
59    * @param sess The consuming session.
60    * @param momMsg The MOM message to wrap.
61    */

62   Message(Session sess, com.scalagent.kjoram.messages.Message momMsg)
63   {
64     this.sess = sess;
65     this.momMsg = momMsg;
66   }
67
68   
69   /**
70    * API method.
71    *
72    * @exception IllegalStateException If the session is closed.
73    * @exception JMSException If the acknowledgement fails for any other
74    * reason.
75    */

76   public void acknowledge() throws JMSException
77   {
78     if (sess == null
79         || sess.transacted
80         || sess.acknowledgeMode != Session.CLIENT_ACKNOWLEDGE)
81       return;
82
83     if (sess.closed)
84       throw new IllegalStateException JavaDoc("Forbidden call on a closed session.");
85
86     sess.acknowledge();
87   }
88
89   /**
90    * API method.
91    *
92    * @exception JMSException Actually never thrown.
93    */

94   public void clearBody() throws JMSException
95   {
96     momMsg.clearBody();
97   }
98
99   /**
100    * API method.
101    *
102    * @exception JMSException Actually never thrown.
103    */

104   public void clearProperties() throws JMSException
105   {
106     momMsg.clearProperties();
107   }
108
109   /**
110    * API method.
111    *
112    * @exception JMSException Actually never thrown.
113    */

114   public boolean propertyExists(String JavaDoc name) throws JMSException
115   {
116     return momMsg.propertyExists(name);
117   }
118
119   /**
120    * API method.
121    *
122    * @exception JMSException Actually never thrown.
123    */

124   public Enumeration getPropertyNames() throws JMSException
125   {
126     return momMsg.getPropertyNames();
127   }
128
129  
130   /**
131    * API method.
132    *
133    * @exception JMSException Actually never thrown.
134    */

135   public void setJMSMessageID(String JavaDoc id) throws JMSException
136   {
137     momMsg.setIdentifier(id);
138   }
139
140    
141   /**
142    * API method.
143    *
144    * @exception JMSException If the priority value is incorrect.
145    */

146   public void setJMSPriority(int priority) throws JMSException
147   {
148     if (0 <= priority && priority <= 9)
149       momMsg.setPriority(priority);
150     else
151       throw new JMSException("Priority of "+ priority +" is not valid"
152                              + " (should be an integer between 0 and 9).");
153   }
154
155   /**
156    * API method.
157    *
158    * @exception JMSException Actually never thrown.
159    */

160   public void setJMSDestination(Destination dest) throws JMSException
161   {
162     if (dest == null)
163       momMsg.setDestination(null, true);
164
165     if (dest instanceof Queue)
166       momMsg.setDestination(((Queue) dest).getQueueName(), true);
167     else
168       momMsg.setDestination(((Topic) dest).getTopicName(), false);
169
170     if (dest instanceof TemporaryQueue || dest instanceof TemporaryTopic)
171       momMsg.setOptionalHeader("JMSTempDestination", new Boolean JavaDoc(true));
172     else
173       momMsg.setOptionalHeader("JMSTempDestination", new Boolean JavaDoc(false));
174   }
175
176   /**
177    * API method.
178    *
179    * @exception JMSException Actually never thrown.
180    */

181   public void setJMSExpiration(long expiration) throws JMSException
182   {
183     momMsg.setExpiration(expiration);
184   }
185
186   /**
187    * API method.
188    *
189    * @exception JMSException Actually never thrown.
190    */

191   public void setJMSRedelivered(boolean redelivered) throws JMSException
192   {
193     momMsg.denied = redelivered;
194   }
195
196   /**
197    * API method.
198    *
199    * @exception JMSException Actually never thrown.
200    */

201   public void setJMSReplyTo(Destination replyTo) throws JMSException
202   {
203     if (replyTo == null)
204       momMsg.setReplyTo(null, true);
205
206     if (replyTo instanceof Queue)
207       momMsg.setReplyTo(((Queue) replyTo).getQueueName(), true);
208     else
209       momMsg.setReplyTo(((Topic) replyTo).getTopicName(), false);
210
211     if (replyTo instanceof TemporaryQueue || replyTo instanceof TemporaryTopic)
212       momMsg.setOptionalHeader("JMSTempReplyTo", new Boolean JavaDoc(true));
213     else
214       momMsg.setOptionalHeader("JMSTempReplyTo", new Boolean JavaDoc(false));
215   }
216   
217   /**
218    * API method.
219    *
220    * @exception JMSException Actually never thrown.
221    */

222   public void setJMSTimestamp(long timestamp) throws JMSException
223   {
224     momMsg.setTimestamp(timestamp);
225   }
226
227   /**
228    * API method.
229    *
230    * @exception JMSException Actually never thrown.
231    */

232   public void setJMSCorrelationID(String JavaDoc correlationID) throws JMSException
233   {
234     momMsg.setCorrelationId(correlationID);
235   }
236   
237   /**
238    * API method.
239    *
240    * @exception JMSException Actually never thrown.
241    */

242   public void setJMSCorrelationIDAsBytes(byte[] correlationID)
243             throws JMSException
244   {
245     momMsg.setCorrelationId(ConversionHelper.toString(correlationID));
246   }
247   
248   /**
249    * API method.
250    *
251    * @exception JMSException Actually never thrown.
252    */

253   public void setJMSType(String JavaDoc type) throws JMSException
254   {
255     momMsg.setOptionalHeader("JMSType", type);
256   }
257
258   /**
259    * API method.
260    *
261    * @exception JMSException If the delivery mode is incorrect.
262    */

263   public void setJMSDeliveryMode(int deliveryMode) throws JMSException
264   {
265     if (deliveryMode != DeliveryMode.PERSISTENT
266     && deliveryMode != DeliveryMode.NON_PERSISTENT)
267       throw new JMSException("Invalid delivery mode.");
268
269     momMsg.setPersistent(deliveryMode == DeliveryMode.PERSISTENT);
270   }
271
272   /**
273    * API method.
274    *
275    * @exception JMSException Actually never thrown.
276    */

277   public String JavaDoc getJMSMessageID() throws JMSException
278   {
279     return momMsg.getIdentifier();
280   }
281   
282   /**
283    * API method.
284    *
285    * @exception JMSException Actually never thrown.
286    */

287   public int getJMSPriority() throws JMSException
288   {
289     return momMsg.getPriority();
290   }
291  
292   /**
293    * API method.
294    *
295    * @exception JMSException Actually never thrown.
296    */

297   public int getJMSDeliveryMode() throws JMSException
298   {
299     if (momMsg.getPersistent())
300       return DeliveryMode.PERSISTENT;
301     else
302       return DeliveryMode.NON_PERSISTENT;
303   }
304
305   /**
306    * API method.
307    *
308    * @exception JMSException Actually never thrown.
309    */

310   public Destination getJMSDestination() throws JMSException
311   {
312     String JavaDoc id = momMsg.getDestinationId();
313     boolean queue = momMsg.toQueue();
314     Object JavaDoc temporaryValue = null;
315     boolean temporary = false;
316
317     try {
318       temporaryValue = momMsg.getOptionalHeader("JMSTempDestination");
319       temporary = ConversionHelper.toBoolean(temporaryValue);
320     }
321     // If the value can't be retrieved, it might be because the sender is
322
// not a JMS client and did not know about temporary destinations...
323
catch (Exception JavaDoc exc) {}
324
325     if (queue) {
326       if (temporary)
327         return new TemporaryQueue(id, null);
328       else
329         return new Queue(id);
330     }
331     else {
332       if (temporary)
333         return new TemporaryTopic(id, null);
334       else
335         return new Topic(id);
336     }
337   }
338
339   /**
340    * API method.
341    *
342    * @exception JMSException Actually never thrown.
343    */

344   public long getJMSExpiration() throws JMSException
345   {
346     return momMsg.getExpiration();
347   }
348
349   /**
350    * API method.
351    *
352    * @exception JMSException Actually never thrown.
353    */

354   public boolean getJMSRedelivered() throws JMSException
355   {
356     return momMsg.denied;
357   }
358
359   /**
360    * API method.
361    *
362    * @exception JMSException Actually never thrown.
363    */

364   public Destination getJMSReplyTo() throws JMSException
365   {
366     String JavaDoc id = momMsg.getReplyToId();
367     boolean queue = momMsg.replyToQueue();
368     Object JavaDoc temporaryValue = null;
369     boolean temporary = false;
370
371     if (id == null)
372       return null;
373
374     try {
375       temporaryValue = momMsg.getOptionalHeader("JMSTempReplyTo");
376       temporary = ConversionHelper.toBoolean(temporaryValue);
377     }
378     // If the value can't be retrieved, it might be because the sender is not
379
// a JMS client...
380
catch (Exception JavaDoc exc) {}
381   
382     if (queue) {
383       if (temporary)
384         return new TemporaryQueue(id, null);
385       else
386         return new Queue(id);
387     }
388     else {
389       if (temporary)
390         return new TemporaryTopic(id, null);
391       else
392         return new Topic(id);
393     }
394   }
395
396   /**
397    * API method.
398    *
399    * @exception JMSException Actually never thrown.
400    */

401   public long getJMSTimestamp() throws JMSException
402   {
403     return momMsg.getTimestamp();
404   }
405
406   /**
407    * API method.
408    *
409    * @exception JMSException Actually never thrown.
410    */

411   public String JavaDoc getJMSType() throws JMSException
412   {
413     Object JavaDoc value = momMsg.getOptionalHeader("JMSType");
414     return ConversionHelper.toString(value);
415   }
416
417   /**
418    * API method.
419    *
420    * @exception JMSException Actually never thrown.
421    */

422   public String JavaDoc getJMSCorrelationID() throws JMSException
423   {
424     return momMsg.getCorrelationId();
425   }
426   
427   /**
428    * API method.
429    *
430    * @exception MessageFormatException In case of a problem while retrieving
431    * the field.
432    */

433   public byte[] getJMSCorrelationIDAsBytes() throws JMSException
434   {
435     try {
436       return ConversionHelper.toBytes(momMsg.getCorrelationId());
437     }
438     catch (MessageValueException mE) {
439       throw new MessageFormatException(mE.getMessage());
440     }
441   }
442
443   /**
444    * API method.
445    *
446    * @exception MessageNotWriteableException If the message is read-only.
447    * @exception JMSException If the property name is invalid.
448    */

449   public void setBooleanProperty(String JavaDoc name, boolean value)
450             throws JMSException
451   {
452     doSetProperty(name, new Boolean JavaDoc(value));
453   }
454
455   /**
456    * API method.
457    *
458    * @exception MessageNotWriteableException If the message is read-only.
459    * @exception JMSException If the property name is invalid.
460    */

461   public void setByteProperty(String JavaDoc name, byte value) throws JMSException
462   {
463     doSetProperty(name, new Byte JavaDoc(value));
464   }
465
466   /**
467    * API method.
468    *
469    * @exception MessageNotWriteableException If the message is read-only.
470    * @exception JMSException If the property name is invalid.
471    */

472 // public void setDoubleProperty(String name, double value) throws JMSException
473
// {
474
// doSetProperty(name, new Double(value));
475
// }
476

477   /**
478    * API method.
479    *
480    * @exception MessageNotWriteableException If the message is read-only.
481    * @exception JMSException If the property name is invalid.
482    */

483 // public void setFloatProperty(String name, float value) throws JMSException
484
// {
485
// doSetProperty(name, new Float(value));
486
// }
487

488   /**
489    * API method.
490    *
491    * @exception MessageNotWriteableException If the message is read-only.
492    * @exception JMSException If the property name is invalid.
493    */

494   public void setIntProperty(String JavaDoc name, int value) throws JMSException
495   {
496     doSetProperty(name, new Integer JavaDoc(value));
497   }
498
499   /**
500    * API method.
501    *
502    * @exception MessageNotWriteableException If the message is read-only.
503    * @exception JMSException If the property name is invalid.
504    */

505   public void setLongProperty(String JavaDoc name, long value) throws JMSException
506   {
507     doSetProperty(name, new Long JavaDoc(value));
508   }
509
510   /**
511    * API method.
512    *
513    * @exception MessageNotWriteableException If the message is read-only.
514    * @exception JMSException If the property name is invalid, or if the
515    * object is invalid.
516    */

517   public void setObjectProperty(String JavaDoc name, Object JavaDoc value) throws JMSException
518   {
519     doSetProperty(name, value);
520   }
521
522   /**
523    * API method.
524    *
525    * @exception MessageNotWriteableException If the message is read-only.
526    * @exception JMSException If the property name is invalid.
527    */

528   public void setShortProperty(String JavaDoc name, short value) throws JMSException
529   {
530     doSetProperty(name, new Short JavaDoc(value));
531   }
532
533   /**
534    * API method.
535    *
536    * @exception MessageNotWriteableException If the message is read-only.
537    * @exception JMSException If the property name is invalid.
538    */

539   public void setStringProperty(String JavaDoc name, String JavaDoc value) throws JMSException
540   {
541     doSetProperty(name, value);
542   }
543
544
545   /**
546    * API method.
547    *
548    * @exception MessageFormatException If the property type is invalid.
549    * @exception JMSException If the name is invalid.
550    */

551   public boolean getBooleanProperty(String JavaDoc name) throws JMSException
552   {
553     try {
554       return ConversionHelper.toBoolean(doGetProperty(name));
555     }
556     catch (MessageValueException mE) {
557       throw new MessageFormatException(mE.getMessage());
558     }
559   }
560   
561   /**
562    * API method.
563    *
564    * @exception MessageFormatException If the property type is invalid.
565    * @exception JMSException If the name is invalid.
566    */

567   public byte getByteProperty(String JavaDoc name) throws JMSException
568   {
569     try {
570       return ConversionHelper.toByte(doGetProperty(name));
571     }
572     catch (MessageValueException mE) {
573       throw new MessageFormatException(mE.getMessage());
574     }
575   }
576
577   /**
578    * API method.
579    *
580    * @exception MessageFormatException If the property type is invalid.
581    * @exception JMSException If the name is invalid.
582    */

583 // public double getDoubleProperty(String name) throws JMSException
584
// {
585
// try {
586
// return ConversionHelper.toDouble(doGetProperty(name));
587
// }
588
// catch (MessageValueException mE) {
589
// throw new MessageFormatException(mE.getMessage());
590
// }
591
// }
592

593   /**
594    * API method.
595    *
596    * @exception MessageFormatException If the property type is invalid.
597    * @exception JMSException If the name is invalid.
598    */

599 // public float getFloatProperty(String name) throws JMSException
600
// {
601
// try {
602
// return ConversionHelper.toFloat(doGetProperty(name));
603
// }
604
// catch (MessageValueException mE) {
605
// throw new MessageFormatException(mE.getMessage());
606
// }
607
// }
608

609   /**
610    * API method.
611    *
612    * @exception MessageFormatException If the property type is invalid.
613    * @exception JMSException If the name is invalid.
614    */

615   public int getIntProperty(String JavaDoc name) throws JMSException
616   {
617     try {
618       return ConversionHelper.toInt(doGetProperty(name));
619     }
620     catch (MessageValueException mE) {
621       throw new MessageFormatException(mE.getMessage());
622     }
623   }
624
625   /**
626    * API method.
627    *
628    * @exception MessageFormatException If the property type is invalid.
629    * @exception JMSException If the name is invalid.
630    */

631   public long getLongProperty(String JavaDoc name) throws JMSException
632   {
633     try {
634       return ConversionHelper.toLong(doGetProperty(name));
635     }
636     catch (MessageValueException mE) {
637       throw new MessageFormatException(mE.getMessage());
638     }
639   }
640
641   /**
642    * API method.
643    *
644    * @exception JMSException If the name is invalid.
645    */

646   public Object JavaDoc getObjectProperty(String JavaDoc name) throws JMSException
647   {
648     return doGetProperty(name);
649   }
650
651   /**
652    * API method.
653    *
654    * @exception MessageFormatException If the property type is invalid.
655    * @exception JMSException If the name is invalid.
656    */

657   public short getShortProperty(String JavaDoc name) throws JMSException
658   {
659     try {
660       return ConversionHelper.toShort(doGetProperty(name));
661     }
662     catch (MessageValueException mE) {
663       throw new MessageFormatException(mE.getMessage());
664     }
665   }
666
667   /**
668    * API method.
669    *
670    * @exception JMSException If the name is invalid.
671    */

672   public String JavaDoc getStringProperty(String JavaDoc name) throws JMSException
673   {
674     return ConversionHelper.toString(doGetProperty(name));
675   }
676
677   /**
678    * Method actually setting a new property.
679    *
680    * @param name The property name.
681    * @param value The property value.
682    *
683    * @exception MessageFormatException If the property type is invalid.
684    * @exception MessageNotWriteableException If the message is read-only.
685    * @exception JMSException If the name is invalid.
686    * @exception IllegalArgumentException If the name string is null or empty.
687    */

688   private void doSetProperty(String JavaDoc name, Object JavaDoc value) throws JMSException
689   {
690     if (name == null || name.equals(""))
691       throw new IllegalArgumentException JavaDoc("Invalid property name: " + name);
692
693     String JavaDoc upName = name.toUpperCase();
694
695     try {
696       if (name.startsWith("JMSX")) {
697         if (name.equals("JMSXGroupID"))
698           momMsg.setOptionalHeader(name, ConversionHelper.toString(value));
699         else if (name.equals("JMSXGroupSeq"))
700           momMsg.setOptionalHeader(name,
701                                    new Integer JavaDoc(ConversionHelper.toInt(value)));
702         else
703           throw new JMSException("Property names with prefix 'JMSX' are"
704                                  + " reserved.");
705       }
706       else if (name.startsWith("JMS_"))
707         throw new JMSException("Property names with prefix 'JMS_' are"
708                                + " reserved.");
709       else if (name.startsWith("JMS"))
710         throw new JMSException("Property names with prefix 'JMS' are"
711                                + " reserved.");
712       else if (upName.equals("NULL")
713                || upName.equals("TRUE")
714                || upName.equals("FALSE")
715                || upName.equals("NOT")
716                || upName.equals("AND")
717                || upName.equals("OR")
718                || upName.equals("BETWEEN")
719                || upName.equals("LIKE")
720                || upName.equals("IN")
721                || upName.equals("IS")
722                || upName.equals("ESCAPE"))
723         throw new JMSException("Invalid property name: " + name + " is a"
724                                + " SQL terminal.");
725       else
726         momMsg.setObjectProperty(name, value);
727     }
728     catch (MessageException mE) {
729       if (mE instanceof MessageValueException)
730         throw new MessageFormatException(mE.getMessage());
731       if (mE instanceof MessageROException)
732         throw new MessageNotWriteableException(mE.getMessage());
733     }
734   }
735
736   /**
737    * Method actually getting a property.
738    *
739    * @param name The property name.
740    */

741   private Object JavaDoc doGetProperty(String JavaDoc name)
742   {
743     if (name == null || name.equals(""))
744       throw new IllegalArgumentException JavaDoc("Invalid property name: " + name);
745
746     Object JavaDoc value = null;
747
748     if (name.startsWith("JMSX")) {
749       if (name.equals("JMSXDeliveryCount"))
750         value = new Integer JavaDoc(momMsg.deliveryCount);
751       else
752         value = momMsg.getOptionalHeader(name);
753     }
754     else if (name.startsWith("JMS_JORAM")) {
755       if (name.equals("JMS_JORAM_DELETEDDEST"))
756         value = new Boolean JavaDoc(momMsg.deletedDest);
757       else if (name.equals("JMS_JORAM_NOTWRITABLE"))
758         value = new Boolean JavaDoc(momMsg.notWriteable);
759       else if (name.equals("JMS_JORAM_EXPIRED"))
760         value = new Boolean JavaDoc(momMsg.expired);
761       else if (name.equals("JMS_JORAM_UNDELIVERABLE"))
762         value = new Boolean JavaDoc(momMsg.undeliverable);
763     }
764     else
765       value = momMsg.getObjectProperty(name);
766
767     return value;
768   }
769
770
771   /**
772    * Method called by message producers for getting the wrapped MOM message
773    * they actually send.
774    *
775    * @exception MessageFormatException If the data could not be serialized.
776    */

777   com.scalagent.kjoram.messages.Message getMomMessage()
778     throws MessageFormatException
779   {
780     try {
781       prepare();
782       return momMsg;
783     }
784     catch (Exception JavaDoc e) {
785       MessageFormatException jE =
786         new MessageFormatException("The message body could not be"
787                                    + " serialized.");
788       jE.setLinkedException(e);
789       throw jE;
790     }
791   }
792  
793   /**
794    * Wraps a given MOM message in the appropriate Joram message.
795    * <p>
796    * This method is actually called by a session consuming a MOM message
797    * for wrapping it in a Joram message before handing it to the consumer.
798    *
799    * @exception JMSException If an error occurs while building the message.
800    */

801   static Message
802          wrapMomMessage(Session sess, com.scalagent.kjoram.messages.Message momMsg)
803          throws JMSException
804   {
805     Message msg = null;
806
807     if (momMsg.getType() == MessageType.SIMPLE)
808       msg = new Message(sess, momMsg);
809     else if (momMsg.getType() == MessageType.TEXT)
810       msg = new TextMessage(sess, momMsg);
811     else if (momMsg.getType() == MessageType.MAP)
812       msg = new MapMessage(sess, momMsg);
813     else if (momMsg.getType() == MessageType.BYTES)
814       msg = new BytesMessage(sess, momMsg);
815
816     return msg;
817   }
818
819   /**
820    * Converts a non-Joram JMS message into a Joram message.
821    *
822    * @exception JMSException If an error occurs while building the message.
823    */

824   static Message convertJMSMessage(Message jmsMsg)
825          throws JMSException
826   {
827     Message msg = null;
828     if (jmsMsg instanceof TextMessage) {
829       msg = new TextMessage();
830       ((TextMessage) msg).setText(((TextMessage)jmsMsg).getText());
831     }
832     else if (jmsMsg instanceof BytesMessage) {
833       msg = new BytesMessage();
834       try {
835         while (true)
836           ((BytesMessage) msg).writeByte(((BytesMessage)jmsMsg).readByte());
837       }
838       catch (MessageEOFException mE) {}
839     }
840     else if (jmsMsg instanceof MapMessage) {
841       msg = new MapMessage();
842       Enumeration mapNames = ((MapMessage) jmsMsg).getMapNames();
843     }
844     else
845       msg = new Message();
846
847     msg.setJMSCorrelationID(jmsMsg.getJMSCorrelationID());
848     msg.setJMSReplyTo(jmsMsg.getJMSReplyTo());
849     msg.setJMSType(jmsMsg.getJMSType());
850
851     return msg;
852   }
853
854   /**
855    * Method preparing the message for sending; resets header values, and
856    * serializes the body (done in subclasses).
857    *
858    * @exception Exception If an error occurs while serializing.
859    */

860   protected void prepare() throws Exception JavaDoc
861   {
862     momMsg.denied = false;
863     momMsg.deletedDest = false;
864     momMsg.expired = false;
865     momMsg.notWriteable = false;
866     momMsg.undeliverable = false;
867   }
868 }
869
Popular Tags