KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jacorb > notification > servant > ECProxyPullConsumerImpl


1 package org.jacorb.notification.servant;
2
3 /*
4  * JacORB - a free Java ORB
5  *
6  * Copyright (C) 1997-2004 Gerald Brose.
7  *
8  * This library is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU Library General Public
10  * License as published by the Free Software Foundation; either
11  * version 2 of the License, or (at your option) any later version.
12  *
13  * This library is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16  * Library General Public License for more details.
17  *
18  * You should have received a copy of the GNU Library General Public
19  * License along with this library; if not, write to the Free
20  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21  */

22
23 import org.apache.avalon.framework.configuration.Configuration;
24 import org.jacorb.notification.MessageFactory;
25 import org.jacorb.notification.OfferManager;
26 import org.jacorb.notification.SubscriptionManager;
27 import org.jacorb.notification.engine.TaskProcessor;
28 import org.omg.CORBA.ORB JavaDoc;
29 import org.omg.CosEventChannelAdmin.AlreadyConnected;
30 import org.omg.CosEventChannelAdmin.ProxyPullConsumerHelper;
31 import org.omg.CosEventChannelAdmin.ProxyPullConsumerOperations;
32 import org.omg.CosEventChannelAdmin.ProxyPullConsumerPOATie;
33 import org.omg.CosEventComm.PullSupplier;
34 import org.omg.PortableServer.POA JavaDoc;
35 import org.omg.PortableServer.Servant JavaDoc;
36
37 /**
38  * @author Alphonse Bendt
39  * @version $Id: ECProxyPullConsumerImpl.java,v 1.6 2005/02/14 00:11:54 alphonse.bendt Exp $
40  */

41
42 public class ECProxyPullConsumerImpl extends ProxyPullConsumerImpl implements
43         ProxyPullConsumerOperations
44 {
45     public ECProxyPullConsumerImpl(IAdmin admin, ORB JavaDoc orb, POA JavaDoc poa, Configuration conf,
46             TaskProcessor taskProcessor, MessageFactory messageFactory)
47     {
48         super(admin, orb, poa, conf, taskProcessor, messageFactory, OfferManager.NULL_MANAGER,
49                 SubscriptionManager.NULL_MANAGER);
50     }
51
52     public void connect_pull_supplier(PullSupplier pullSupplier) throws AlreadyConnected
53     {
54         connect_any_pull_supplier(pullSupplier);
55     }
56
57     public synchronized Servant JavaDoc getServant()
58     {
59         if (thisServant_ == null)
60         {
61             thisServant_ = new ProxyPullConsumerPOATie(this);
62         }
63
64         return thisServant_;
65     }
66
67     public org.omg.CORBA.Object JavaDoc activate()
68     {
69         return ProxyPullConsumerHelper.narrow(getServant()._this_object(getORB()));
70     }
71
72 }
Popular Tags