Nils:
See notes in-line. > -----Original Message----- > From: Emperor [mailto:[EMAIL PROTECTED]] > Sent: Saturday, 23 February, 2002 17:37 > To: [EMAIL PROTECTED] > Subject: managed threads. > > > hi, > > I started developing my asynchronous connection manager. I think the > first implementation will use NBIO. > > As I'm pretty new to avalon I don't really know how to implement a > manager. I don't really understand the blocks/services split up in the > cornerstone source. or is this deprecated? which interfaces should my > manager include? Blocks are great when you are dealing with a bunch of systems and you want to be able to treat all of those systems in the same way. Blocks provide meta-information about a component and its relationship to other components - so if you building a tool that does something like "just-run- this-thing-and-I-only-want-to-hear-about-results", then blocks are very cool because you can lookup dependencies between components, lookup the names that a component expects when looking up something, etc. Given that your new to Avalon I would ignore the blocks stuff for the moment. Instead - focus on the issue of implementing a "component". First step is understanding that a component typically exposes some basic behaviours - including but not limited to existence, constants, fulfilment, context, and death with dignity. See the following URL for an explanation of that last sentence! http://www.mail-archive.com/[email protected]/msg05891.html A manager (either ComponentManager or ServiceManager) is simply providing the mechanisms by which a component is provided with the resources/service/ objects it needs to fulfil its objectives. But remember that a manager is only one part of the overall picture of what a target component semantics constitute. The set of semantics for a particular "component" are reflected by the interface it implements - e.g. LogEnabled, Configurable, Contextualizable, Serviceable, Initializable, Startable, Disposable, etc. For a simple example of a main method that handles a set-up of a component, you could take a look at the cornerstone/apps/enterprise/orb/src/examples package which contains an CORBA related example in which a main method applies logging, configuration, contextulization and initalization. A demo including the creation and provision of a component manager will also be added in the near future. http://cvs.apache.org/viewcvs/jakarta-avalon-cornerstone/apps/enterprise/orb /src/examples/hello/java/hello/HelloDemo.java?rev=1.3&content-type=text/vnd. viewcvs-markup Hope this helps. Cheers, Steve. > I need some threads for the manager... how do I retrieve an instance? is > it the best way to implement multithreading? > > thx, > > Nils > -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
