1 package org.objectweb.celtix.bus.ws.rm; 2 3 import java.io.InputStream ; 4 import java.math.BigInteger ; 5 6 import javax.xml.ws.handler.MessageContext; 7 8 import org.objectweb.celtix.ws.rm.persistence.RMMessage; 9 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(this.getContext()); 31 } 32 33 public BigInteger getMessageNr() { 34 return messageNumber; 35 } 36 37 } 38 | Popular Tags |