01: package org.objectweb.celtix.bus.ws.rm;
02:
03: import java.io.InputStream;
04: import java.math.BigInteger;
05:
06: import javax.xml.ws.handler.MessageContext;
07:
08: import org.objectweb.celtix.ws.rm.persistence.RMMessage;
09:
10: public class RMMessageImpl implements RMMessage {
11:
12: private BigInteger messageNumber;
13: private MessageContext context;
14:
15: public RMMessageImpl(BigInteger mn, MessageContext ctx) {
16: messageNumber = mn;
17: context = ctx;
18: }
19:
20: public RMMessageImpl(BigInteger mn, InputStream is) {
21: messageNumber = mn;
22: context = RMUtils.getPersistenceUtils().getContext(is);
23: }
24:
25: public MessageContext getContext() {
26: return context;
27: }
28:
29: public InputStream getContextAsStream() {
30: return RMUtils.getPersistenceUtils().getContextAsInputStream(
31: this .getContext());
32: }
33:
34: public BigInteger getMessageNr() {
35: return messageNumber;
36: }
37:
38: }
|