Java Doc for ProxyPullSupplierImpl.java in  » Collaboration » JacORB » org » jacorb » events » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Collaboration » JacORB » org.jacorb.events 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.jacorb.events.ProxyPullSupplierImpl

ProxyPullSupplierImpl
public class ProxyPullSupplierImpl extends org.omg.CosEventChannelAdmin.ProxyPullSupplierPOA (Code)
Implementation of COSEventChannelAdmin interface; ProxyPullSupplier. This defines connect_pull_consumer(), disconnect_pull_supplier() and the all important pull() and try_pull() methods that the Consumer can call to actuall deliver a message. 2002/23/08 JFC OMG EventService Specification 1.1 page 2-7 states: "Registration is a two step process. An event-generating application first obtains a proxy consumer from a channel, then 'connects' to the proxy consumer by providing it with a supplier. ... The reason for the two step registration process..." Modifications to support the above have been made as well as to support section 2.1.5 "Disconnection Behavior" on page 2-4.
author:
   Jeff Carlson
author:
   Joerg v. Frantzius
author:
   Rainer Lischetzki
author:
   Gerald Brose
version:
   $Id: ProxyPullSupplierImpl.java,v 1.11 2004/05/06 12:39:58 nicolas Exp $



Constructor Summary
protected  ProxyPullSupplierImpl(EventChannelImpl ec, org.omg.CORBA.ORB orb, org.omg.PortableServer.POA poa)
    

Method Summary
public  org.omg.PortableServer.POA_default_POA()
     Override this method from the Servant baseclass.
public  voidconnect_pull_consumer(PullConsumer pullConsumer)
     ProxyPullSupplier Interface: As stated by the EventService specification 1.1 section 2.3.5: "If a ProxyPullSupplier is already connected to a PullConsumer, then the AlreadyConnected exception is raised." and "If a non-nil reference is passed to connect_push_supplier..." implying that a null reference is acceptable.
public  voiddisconnect_pull_supplier()
     See EventService v 1.1 specification section 2.1.3. 'disconnect_pull_supplier terminates the event communication; it releases resources used at the consumer to support event communication.
public  org.omg.CORBA.Anypull()
     PullSupplier Interface. section 2.1.3 states that "The pull operation blocks until the event data is available or an exception is raised.
public  voidpush_to_supplier(org.omg.CORBA.Any event)
     Have to be able to get to the internal list of events.
public  org.omg.CORBA.Anytry_pull(org.omg.CORBA.BooleanHolder hasEvent)
     PullSupplier Interface. section 2.1.3 states that "The try_pull operation does not block: if the event data is available, it returns the event data and sets the has_event parameter to true; if the event is not available, it sets the has_event parameter to false and the event data is returned as long with an undefined value. It seems that the event queue should be defined as a LIFO queue.


Constructor Detail
ProxyPullSupplierImpl
protected ProxyPullSupplierImpl(EventChannelImpl ec, org.omg.CORBA.ORB orb, org.omg.PortableServer.POA poa)(Code)
Constructor - to be called by EventChannel




Method Detail
_default_POA
public org.omg.PortableServer.POA _default_POA()(Code)
Override this method from the Servant baseclass. Fintan Bolton in his book "Pure CORBA" suggests that you override this method to avoid the risk that a servant object (like this one) could be activated by the wrong POA object.



connect_pull_consumer
public void connect_pull_consumer(PullConsumer pullConsumer) throws org.omg.CosEventChannelAdmin.AlreadyConnected(Code)
ProxyPullSupplier Interface: As stated by the EventService specification 1.1 section 2.3.5: "If a ProxyPullSupplier is already connected to a PullConsumer, then the AlreadyConnected exception is raised." and "If a non-nil reference is passed to connect_push_supplier..." implying that a null reference is acceptable.



disconnect_pull_supplier
public void disconnect_pull_supplier()(Code)
See EventService v 1.1 specification section 2.1.3. 'disconnect_pull_supplier terminates the event communication; it releases resources used at the consumer to support event communication. Calling this causes the implementation to call disconnect_pull_consumer operation on the corresponding PullConsumer interface (if that iterface is known).' See EventService v 1.1 specification section 2.1.5. This method should adhere to the spec as it a) causes a call to the corresponding disconnect on the connected supplier, b) 'If a consumer or supplier has received a disconnect call and subsequently receives another disconnect call, it shall raise a CORBA::OBJECT_NOT_EXIST exception. See EventService v 1.1 specification section 2.3.5. If [a nil object reference is passed to connect_pull_consumer] a channel cannot invoke a disconnect_pull_consumer operation on the consumer.



pull
public org.omg.CORBA.Any pull() throws org.omg.CosEventComm.Disconnected(Code)
PullSupplier Interface. section 2.1.3 states that "The pull operation blocks until the event data is available or an exception is raised. It returns data to the consumer."



push_to_supplier
public void push_to_supplier(org.omg.CORBA.Any event)(Code)
Have to be able to get to the internal list of events. This is how to add stuff to this list. I have to decide whether to a) just ignore the event, b) add the event to the queue and remove the oldest event, c) throw an runtime exception. Right now, I'm going with option b.



try_pull
public org.omg.CORBA.Any try_pull(org.omg.CORBA.BooleanHolder hasEvent) throws org.omg.CosEventComm.Disconnected(Code)
PullSupplier Interface. section 2.1.3 states that "The try_pull operation does not block: if the event data is available, it returns the event data and sets the has_event parameter to true; if the event is not available, it sets the has_event parameter to false and the event data is returned as long with an undefined value. It seems that the event queue should be defined as a LIFO queue. Finton Bolton in his book Pure CORBA states that this is the "norm". I think that is really stupid. Who wants events in reverse order with a possibility of never getting the first messge? I will therefore implement this as a FIFO queue and wait for someone to convince me otherwise.



www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.