KickJava   Java API By Example, From Geeks To Geeks.

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


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.PushTaskExecutorFactory;
28 import org.jacorb.notification.engine.TaskProcessor;
29 import org.omg.CORBA.ORB JavaDoc;
30 import org.omg.CosEventChannelAdmin.AlreadyConnected;
31 import org.omg.CosEventChannelAdmin.ProxyPushSupplierHelper;
32 import org.omg.CosEventChannelAdmin.ProxyPushSupplierOperations;
33 import org.omg.CosEventChannelAdmin.ProxyPushSupplierPOATie;
34 import org.omg.CosEventComm.PushConsumer;
35 import org.omg.CosNotifyChannelAdmin.ConsumerAdmin;
36 import org.omg.PortableServer.POA JavaDoc;
37 import org.omg.PortableServer.Servant JavaDoc;
38
39 /**
40  * @author Alphonse Bendt
41  * @version $Id: ECProxyPushSupplierImpl.java,v 1.10 2005/04/27 10:45:46 alphonse.bendt Exp $
42  */

43 public class ECProxyPushSupplierImpl extends ProxyPushSupplierImpl implements
44         ProxyPushSupplierOperations
45 {
46     private static final ConsumerAdmin NO_ADMIN = null;
47     
48     public ECProxyPushSupplierImpl(IAdmin admin, ORB JavaDoc orb, POA JavaDoc poa, Configuration conf,
49             TaskProcessor taskProcessor, PushTaskExecutorFactory pushTaskExecutorFactory) throws ConfigurationException
50     {
51         super(admin, orb, poa, conf, taskProcessor, pushTaskExecutorFactory, OfferManager.NULL_MANAGER, SubscriptionManager.NULL_MANAGER, NO_ADMIN);
52     }
53
54     ////////////////////////////////////////
55

56     public void connect_push_consumer(PushConsumer pushConsumer) throws AlreadyConnected
57     {
58         connect_any_push_consumer(pushConsumer);
59     }
60
61     public synchronized Servant JavaDoc getServant()
62     {
63         if (thisServant_ == null)
64         {
65             thisServant_ = new ProxyPushSupplierPOATie(this);
66         }
67         return thisServant_;
68     }
69
70     public org.omg.CORBA.Object JavaDoc activate()
71     {
72         return ProxyPushSupplierHelper.narrow(getServant()._this_object(getORB()));
73     }
74 }
Popular Tags