KickJava   Java API By Example, From Geeks To Geeks.

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


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.apache.avalon.framework.configuration.ConfigurationException;
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.ProxyPullSupplierHelper;
31 import org.omg.CosEventChannelAdmin.ProxyPullSupplierOperations;
32 import org.omg.CosEventChannelAdmin.ProxyPullSupplierPOATie;
33 import org.omg.CosEventComm.PullConsumer;
34 import org.omg.CosNotifyChannelAdmin.ConsumerAdmin;
35 import org.omg.PortableServer.POA JavaDoc;
36 import org.omg.PortableServer.Servant JavaDoc;
37
38 /**
39  * @author Alphonse Bendt
40  * @version $Id: ECProxyPullSupplierImpl.java,v 1.8 2005/02/20 21:45:26 alphonse.bendt Exp $
41  */

42
43 public class ECProxyPullSupplierImpl extends ProxyPullSupplierImpl implements
44         ProxyPullSupplierOperations
45 {
46     private static final ConsumerAdmin NO_ADMIN = null;
47     
48     public ECProxyPullSupplierImpl(IAdmin admin, ORB JavaDoc orb, POA JavaDoc poa, Configuration conf,
49             TaskProcessor taskProcessor) throws ConfigurationException
50     {
51         super(admin, orb, poa, conf, taskProcessor, OfferManager.NULL_MANAGER, SubscriptionManager.NULL_MANAGER, NO_ADMIN);
52     }
53
54     public void connect_pull_consumer(PullConsumer pullConsumer) throws AlreadyConnected
55     {
56         connect_any_pull_consumer(pullConsumer);
57     }
58
59     public synchronized Servant JavaDoc getServant()
60     {
61         if (thisServant_ == null)
62         {
63             thisServant_ = new ProxyPullSupplierPOATie(this);
64         }
65         return thisServant_;
66     }
67
68     public org.omg.CORBA.Object JavaDoc activate()
69     {
70         return ProxyPullSupplierHelper.narrow(getServant()._this_object(getORB()));
71     }
72 }
Popular Tags