Return-Path: Delivered-To: apmail-jakarta-avalon-cvs-archive@apache.org Received: (qmail 91401 invoked from network); 8 Dec 2001 09:26:22 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 8 Dec 2001 09:26:22 -0000 Received: (qmail 25904 invoked by uid 97); 8 Dec 2001 09:26:33 -0000 Delivered-To: qmlist-jakarta-archive-avalon-cvs@jakarta.apache.org Received: (qmail 25888 invoked by uid 97); 8 Dec 2001 09:26:32 -0000 Mailing-List: contact avalon-cvs-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Avalon CVS List" Reply-To: "Avalon Developers List" Delivered-To: mailing list avalon-cvs@jakarta.apache.org Received: (qmail 25877 invoked by uid 97); 8 Dec 2001 09:26:32 -0000 Date: 8 Dec 2001 09:06:57 -0000 Message-ID: <20011208090657.38921.qmail@icarus.apache.org> From: donaldp@apache.org To: jakarta-avalon-phoenix-cvs@apache.org Subject: cvs commit: jakarta-avalon-phoenix/src/java/org/apache/avalon/phoenix BlockContext.java X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N donaldp 01/12/08 01:06:57 Modified: src/java/org/apache/avalon/phoenix BlockContext.java Log: Added some javadocs to some BlockContext methods indicating future directions. Also add Some commented out methods declarations and javadcs to indicate future directions. Revision Changes Path 1.6 +67 -0 jakarta-avalon-phoenix/src/java/org/apache/avalon/phoenix/BlockContext.java Index: BlockContext.java =================================================================== RCS file: /home/cvs/jakarta-avalon-phoenix/src/java/org/apache/avalon/phoenix/BlockContext.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- BlockContext.java 2001/11/19 12:21:28 1.5 +++ BlockContext.java 2001/12/08 09:06:57 1.6 @@ -28,6 +28,8 @@ * Base directory of .sar application. * * TODO: Should this be getHomeDirectory() or getWorkingDirectory() or other? + * TODO: Should a Block be able to declare it doesn't use the Filesystem? If + * it declares this then it would be an error to call this method. * * @return the base directory */ @@ -65,6 +67,8 @@ /** * Retrieve logger coresponding to named category. * + * TODO: Determine if this is really necessary ? + * * @return the logger */ Logger getLogger( String name ); @@ -76,4 +80,67 @@ * @deprecated Use the getLogger(String) version */ Logger getBaseLogger(); + + /** + * Retrieve the proxy for this object. + * Each Block is referenced by other Blocks via their Proxy. When Phoenix + * shuts down the Block, it can automatically invalidate the proxy. Thus + * any attempt to call a method on a "dead"/shutdown object will result in + * an IllegalStateException. This is desirable as it will + * stop objects from using the Block when it is in an invalid state. + * + *

The proxy also allows Phoenix to associate "Context" information with + * the object. For instance, a Block may expect to run with a + * specific ContextClassLoader set. However if this Block were to be passed + * to another component that processed the Block in a thread that did not + * have the correct context information setup, then the Block could fail + * to perform as expected. By passing the proxy instead, the correct context + * information is maintained by Phoenix.

+ * + *

Note that only interfaces that the Block declares as offered services + * will actually be implemented by the proxy.

+ */ + //Object getProxy(); + + /** + * This method is similar to getProxy() except that it operates + * on arbitrary objects. It will in effect proxy all interfaces that the + * component supports. + * + *

Proxying arbitrary objects is useful for the same reason it is useful + * to proxy the Block. Thus it is recomended that when needed you pass + * Proxys of objects to minimize the chance of incorrect behaviour.

+ */ + //Object getProxy( Object other ); + + /** + * This method generates a Proxy of the specified object using the + * specified interfaces. In other respects it is identical to + * getProxy( Object other ) + */ + //Object getProxy( Object other, Class[] interfaces ); + + /** + * Retrieve a resource from the SAR file. The specified + * name is relative the root of the archive. So you could + * use it to retrieve a html page from within sar by loading + * the resource named "data/main.html" or similar. + */ + //InputStream getResourceAsStream( String name ); + + /** + * This method gives you access to a named ClassLoader. The ClassLoaders + * for an application are declared in the environment.xml + * descriptor. + */ + //ClassLoader getClassLoader( String name ); + + /** + * Retrieve the MBeanServer for this application. + * + * NOTE: Unsure if this will ever be implemented + * may be retrievable via CM instead, or perhaps in + * a directory or whatever. + */ + //MBeanServer getMBeanServer(); } -- To unsubscribe, e-mail: For additional commands, e-mail: