1 24 25 package org.objectweb.dream.message.manager; 26 27 import java.util.HashSet ; 28 import java.util.Set ; 29 30 import org.objectweb.dream.message.Message; 31 import org.objectweb.dream.message.MessageType; 32 import org.objectweb.util.monolog.api.BasicLevel; 33 34 39 public class NonExtensibleMessageManagerDebugPoolImpl 40 extends 41 NonExtensibleMessageManagerPoolImpl 42 { 43 44 Set deletedMessages = new HashSet (); 45 46 49 public synchronized void deleteMessage(Message message) 50 { 51 if (deletedMessages.contains(message)) 52 { 53 logger.log(BasicLevel.ERROR, "Deleting message already deleted", 54 new Exception ()); 55 return; 56 } 57 super.deleteMessage(message); 58 } 59 60 63 public synchronized Message createMessage(MessageType type) 64 throws UnknownChunkTypeError 65 { 66 Message message = super.createMessage(type); 67 deletedMessages.remove(message); 68 return message; 69 } 70 } | Popular Tags |