KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > rift > coad > daemon > messageservice > MessageProducerImpl


1 /*
2  * MessageService: The message service daemon
3  * Copyright (C) 2006 Rift IT Contracting
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2.1 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  * Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with this library; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18  *
19  * MessageProducerImpl.java
20  */

21
22 // package path
23
package com.rift.coad.daemon.messageservice;
24
25 // java imports
26
import java.rmi.Remote JavaDoc;
27 import java.rmi.RemoteException JavaDoc;
28
29
30 /**
31  * This class implements the MessageProducer interface. It is responsible for
32  * creating new producers on demand so that message can be added to the
33  * message service for processing by daemons.
34  *
35  * @author Brett Chaldecott
36  */

37 public class MessageProducerImpl implements MessageProducer {
38     
39     /**
40      * Creates a new instance of MessageProducerImpl
41      */

42     public MessageProducerImpl() {
43     }
44     
45     
46     /**
47      * This method is responsible for creating the message producer session
48      * object.
49      *
50      * @return The message producer object.
51      * @param from The from url for the messages.
52      * @exception RemoteException
53      * @exception MessageServiceException
54      */

55     public Producer createProducer(String JavaDoc from) throws RemoteException JavaDoc,
56             MessageServiceException {
57         return new ProducerImpl(from);
58     }
59 }
60
Popular Tags