1 45 package org.exolab.jms.server; 46 47 import java.util.List ; 48 import javax.jms.JMSException ; 49 import javax.transaction.xa.XAException ; 50 import javax.transaction.xa.Xid ; 51 52 import org.exolab.jms.client.JmsDestination; 53 import org.exolab.jms.client.JmsMessageListener; 54 import org.exolab.jms.client.JmsQueue; 55 import org.exolab.jms.client.JmsTopic; 56 import org.exolab.jms.message.MessageImpl; 57 58 59 66 public interface ServerSession { 67 68 73 void close() throws JMSException ; 74 75 82 void acknowledgeMessage(long consumerId, String messageId) 83 throws JMSException ; 84 85 91 void send(MessageImpl message) throws JMSException ; 92 93 99 void send(List messages) throws JMSException ; 100 101 114 MessageImpl receive(long consumerId, long wait) throws JMSException ; 115 116 124 List browse(long consumerId, int count) throws JMSException ; 125 126 138 long createConsumer(JmsDestination destination, String selector, 139 boolean noLocal) 140 throws JMSException ; 141 142 157 long createDurableConsumer(JmsTopic topic, String name, String selector, 158 boolean noLocal) 159 throws JMSException ; 160 161 170 long createBrowser(JmsQueue queue, String selector) throws JMSException ; 171 172 178 void removeConsumer(long consumerId) throws JMSException ; 179 180 186 void unsubscribe(String name) throws JMSException ; 187 188 193 void start() throws JMSException ; 194 195 200 void stop() throws JMSException ; 201 202 209 void setMessageListener(JmsMessageListener listener); 210 211 219 void enableAsynchronousDelivery(long consumerId, boolean enable) 220 throws JMSException ; 221 222 228 void recover() throws JMSException ; 229 230 236 void commit() throws JMSException ; 237 238 244 void rollback() throws JMSException ; 245 246 255 void start(Xid xid, int flags) throws XAException ; 256 257 265 int prepare(Xid xid) throws XAException ; 266 267 274 void commit(Xid xid, boolean onePhase) throws XAException ; 275 276 286 void end(Xid xid, int flags) throws XAException ; 287 288 295 void forget(Xid xid) throws XAException ; 296 297 307 Xid [] recover(int flag) throws XAException ; 308 309 316 void rollback(Xid xid) throws XAException ; 317 318 325 int getTransactionTimeout() throws XAException ; 326 333 boolean setTransactionTimeout(int seconds) throws XAException ; 334 335 341 String getResourceManagerId() throws XAException ; 342 343 } 344 | Popular Tags |