“Obviously any bolt must implement IBolt" BaseBasicBolt isn’t an IBolt. If possible, sticking to using the “Rich” components will solve these sorts of issues. [http://www.cisco.com/web/europe/images/email/signature/est2014/logo_06.png?ct=1398192119726]
Grant Overby Software Engineer Cisco.com<http://www.cisco.com/> [email protected]<mailto:[email protected]> Mobile: 865 724 4910 [http://www.cisco.com/assets/swa/img/thinkbeforeyouprint.gif] Think before you print. This email may contain confidential and privileged material for the sole use of the intended recipient. Any review, use, distribution or disclosure by others is strictly prohibited. If you are not the intended recipient (or authorized to receive for the recipient), please contact the sender by reply email and delete all copies of this message. Please click here<http://www.cisco.com/web/about/doing_business/legal/cri/index.html> for Company Registration Information. From: Nathan Leung <[email protected]<mailto:[email protected]>> Reply-To: "[email protected]<mailto:[email protected]>" <[email protected]<mailto:[email protected]>> Date: Wednesday, April 15, 2015 at 2:13 PM To: user <[email protected]<mailto:[email protected]>> Subject: Bolt Type Question In storm there are in general two types of bolts, BaseBasicBolt, and IRichBolt. Obviously any bolt must implement IBolt and IComponent, but I would like to create a variable that can contain an instance of either IRichBolt or BaseBasicBolt and have access to all of the methods in IBolt and IComponent. The only way I can think of to do this is to store the Bolt object in an IBolt variable and then case to IComponent as necessary. Is there a better way to do this? Thanks, Nathan
