Ah yes, you are correct. I thought that it was different from IRichBolt, but I misread inheritance hierarchy when I was looking at the code today. So this makes it even more of a potential problem as it doesn't really have a clean solution.
On Wed, Apr 15, 2015 at 3:08 PM, Grant Overby (groverby) <[email protected] > wrote: > “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. > > *Grant Overby* > Software Engineer > Cisco.com <http://www.cisco.com/> > [email protected] > Mobile: *865 724 4910 <865%20724%204910>* > > > > 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]> > Reply-To: "[email protected]" <[email protected]> > Date: Wednesday, April 15, 2015 at 2:13 PM > To: user <[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 >
