com/scalagent/kjoram/jms/ConsumerAckRequest.java

00001 /*
00002  * JORAM: Java(TM) Open Reliable Asynchronous Messaging
00003  * Copyright (C) 2001 - ScalAgent Distributed Technologies
00004  * Copyright (C) 1996 - Dyade
00005  *
00006  * This library is free software; you can redistribute it and/or
00007  * modify it under the terms of the GNU Lesser General Public
00008  * License as published by the Free Software Foundation; either
00009  * version 2.1 of the License, or any later version.
00010  * 
00011  * This library is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014  * Lesser General Public License for more details.
00015  * 
00016  * You should have received a copy of the GNU Lesser General Public
00017  * License along with this library; if not, write to the Free Software
00018  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
00019  * USA.
00020  *
00021  * Initial developer(s): Frederic Maistre (INRIA)
00022  * Contributor(s): Nicolas Tachker (ScalAgent)
00023  */
00024 package com.scalagent.kjoram.jms;
00025 
00026 import java.util.Hashtable;
00027 import java.util.Enumeration;
00028 
00033 public class ConsumerAckRequest extends AbstractJmsRequest
00034 {
00036   private String id;
00038   private boolean queueMode;
00039 
00048   public ConsumerAckRequest(String targetName, String id, boolean queueMode)
00049   {
00050     super(targetName);
00051     this.id = id;
00052     this.queueMode = queueMode;
00053   }
00054 
00058   public ConsumerAckRequest()
00059   {}
00060 
00062   public void setId(String id)
00063   {
00064     this.id = id;
00065   }
00066 
00068   public void setQueueMode(boolean queueMode)
00069   {
00070     this.queueMode = queueMode;
00071   }
00072 
00074   public String getId()
00075   {
00076     return id;
00077   }
00078 
00080   public boolean getQueueMode()
00081   {
00082     return queueMode;
00083   }
00084 
00085   public Hashtable soapCode() {
00086     Hashtable h = super.soapCode();
00087     if (id != null)
00088       h.put("id",id);
00089     h.put("queueMode",new Boolean(queueMode));
00090     return h;
00091   }
00092 
00093   public static Object soapDecode(Hashtable h) {
00094     ConsumerAckRequest req = new ConsumerAckRequest();
00095     req.setRequestId(((Integer) h.get("requestId")).intValue());
00096     req.setTarget((String) h.get("target"));
00097     req.setId((String) h.get("id"));
00098     req.setQueueMode(((Boolean) h.get("queueMode")).booleanValue());
00099     return req;
00100   }
00101 }

Generated on Tue Sep 16 16:14:23 2008 for joram by  doxygen 1.5.0