Console properties

Notice that IConsoleFacet extends IPropertyCollection. This means it also supports read-only name/value pairs:


public interface IPropertyCollection extends IRemote
{
    /** Fetch all the property names.
     */
    public String[] getPropertyNames();

    /** Query a particular application property.
     * @param name  The property we're querying.
     */
    public Property getProperty(String name) throws PropertyException;
}

When a console-oriented application wants to provide access to one of its properties, for example $sas.port, it needs to implement getProperty(String) accordingly. Any such implementation will probably just return the value from a HashMap.

However, a clever implementation will expand on this. An example is Jtrix.org's hosting service which interprets dotted integers and returns the corresponding Property from the hosting MIB. Thus if we know a particular oid carries a warrant then we can execute this on a console:


connect myapp $hosting.30.0.6.2.243.1

Nik Silver 2002-03-09