previous chapter table of contents next chapter

Convenience Classes

The AbstractEntry class implements the Entry interface, and it is designed as a convenience class. It implements methods such as equals() and toString() . An application would probably want to subclass this instead of implementing Entry .

In addition, Sun's implementation of Jini contains a further set of convenience classes, all subclassed out of AbstractEntry . These require the jini-ext.jar file. They are the following:

  • Address ”The address of the physical component of a service.
  • Comment ”A free-form comment about a service.
  • Location ”The location of the physical component of a service. This is distinct from the Address class in that it can be used alone in a small, local organization.
  • Name ”The name of a service as used by users. A service may have multiple names .
  • ServiceInfo ”Generic information about a service. This includes the name of the manufacturer, the product, and the vendor.
  • ServiceType ”Human-oriented information about the "type" of a service. This is not related to its data or class types and is more oriented toward allowing someone to determine what a service (for example, a printer) does and if it is similar to another, without needing to know anything about data or class types for the Java platform.
  • Status ”The base class from which other status-related entry classes can be derived.

For example, the Address class contains the following:

 String country; String locality;           // City or locality name. String organization;       // Name of the company or organization that provides                            // this service. String organizationalUnit; // The unit within the organization that provides this                            // service. String postalCode;         // Postal code. String stateOrProvince;    // Full name or standard postal abbreviation of a                            // state or province. String street;             // Street address. 

You may find these classes useful; on the other hand, what services would like to advertise, and what clients would like to match on, is pretty much unknown as yet. These classes are not part of the formal Jini specification.


A Programmer[ap]s Guide to Jini Technology
A Programmer[ap]s Guide to Jini Technology
ISBN: 1893115801
Year: 2000
Pages: 189

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net