1 21 22 package com.rift.coad.daemon.messageservice.message; 24 25 import com.rift.coad.daemon.messageservice.*; 26 27 28 29 35 public class MessageManagerFactory { 36 37 private static MessageManagerFactory singleton = null; 39 40 43 private MessageManagerFactory() { 44 } 45 46 47 52 public static MessageManagerFactory getInstance() { 53 if (singleton == null) { 54 singleton = new MessageManagerFactory(); 55 } 56 return singleton; 57 } 58 59 60 67 public MessageManager getMessageManager(String id) throws 68 MessageServiceException { 69 return new MessageManagerImpl(id); 70 } 71 72 73 80 public MessageManager getMessageManager(Message message) throws 81 MessageServiceException { 82 return new MessageManagerImpl(message); 83 } 84 } 85 | Popular Tags |