Here's what the interfaces currently look like:

interface RuntimeContextIF
{
        public ComponentLocatorIF
        getComponentLocator();
        
        public void
        requestShutdown() throws SecurityException;
}

interface StartupContextIF extends RuntimeContextIF
{
}

interface ShutdownContextIF extends RuntimeContextIF
{
}

interface DestroyContextIF { }

As you can see, both Startup and Shutdown contexts extend the
RuntimeContextIF.  The container starts up the components in order of their
declared dependencies, and shuts them down in the reverse order.

I've not thought of any meaningful operations on DestroyContextIF, yet...

The only really interesting part of the RuntimeContextIF is the
getComponentLocator() method which returns a ComponentLocatorIF:

public interface ComponentLocatorIF
{

        public static final int SCOPE_LOCAL_REQUIRED = 0;
        public static final int SCOPE_LOCAL_PREFERRED = 1;
        public static final int SCOPE_REMOTE_REQUIRED = 2;
        public static final int SCOPE_REMOTE_PREFERRED = 3;

        public ComponentReferenceIF
        lookup(ComponentDescriptorIF pDescriptor, int pScope)
        throws LocatorException;

        public LookupResultIF
        lookup(InterfaceDescriptorIF pDescriptor, int pScope)
        throws LocatorException;

}

As you can see, it's pretty much the same as Avalon's except that I'm
abstracting out the idea of a "component descriptor" as opposed to a Role, or
URN - and I've added the ability to lookup by interface descriptor - which
will come into play when I integrate Jini-based lookup and discovery.  Both
methods also allow me to restrict the scope of the lookup based on whether I
would like to find a component in the same VM or in a remote VM.

Chad

On Sun, 8 Dec 2002 16:34:04 +1100 Peter Donald <[EMAIL PROTECTED]> wrote:

> On Sun, 8 Dec 2002 14:42, Chad Stansbury wrote:
> > I'm not sure if I'm on the right track or
> not, but so far I've implemented
> > a pretty decent SocketServer and HttpServer
> (both NIO-based) that work
> > pretty well in such an architecture.  If
> you'd like to hear more about it,
> > I'll share more of my work with the group,
> otherwise I'll just go back to
> > my lurking...
> 
> Sure - hearing about it would be great. In
> particular I would be interested in 
> what exactly goes into various contexts -
> particularly StartupContext, 
> ShutdownContext and DestroyContext.
> 
> 
> -- 
> Cheers,
> 
> Peter Donald
> ---------------------------------------------------
> "Wise men don't need advice. Fools don't take
> it." 
>                         -Benjamin Franklin 
> ---------------------------------------------------
> 
> 
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 
> 
> 


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to