com.sun.jini.lookup.entry
Class BasicServiceType

java.lang.Object
  extended by net.jini.entry.AbstractEntry
      extended by net.jini.lookup.entry.ServiceType
          extended by com.sun.jini.lookup.entry.BasicServiceType
All Implemented Interfaces:
Serializable, Entry, ServiceControlled

public class BasicServiceType
extends ServiceType

An implementation of ServiceType that uses ResourceBundles. If the value of the public field type contains at least one dot ('.'), then the value of the field is used as the name of the ResourceBundle. Otherwise, the name of the ResourceBundle is obtained by prefixing "net.jini.lookup.entry.servicetype." to the value of the public field. The default locale is used.

Author:
Sun Microsystems, Inc.
See Also:
Serialized Form

Field Summary
private  ResourceBundle bundle
           
private  boolean inited
           
private static long serialVersionUID
           
 String type
          The type of service.
 
Constructor Summary
BasicServiceType()
          Simple constructor, leaves type field set to null.
BasicServiceType(String type)
          Simple constructor, sets type field to parameter value.
 
Method Summary
 String getDisplayName()
          Returns the resource named "name", else the type field stripped of any package prefix (i.e., any characters up to and including the last dot ('.').
 Image getIcon(int iconKind)
          Returns the resource named "icon.
 String getShortDescription()
          Returns the resource named "desc", else null.
private  void init()
           
 
Methods inherited from class net.jini.entry.AbstractEntry
equals, equals, hashCode, hashCode, toString, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
See Also:
Constant Field Values

type

public String type
The type of service.


bundle

private transient ResourceBundle bundle

inited

private transient boolean inited
Constructor Detail

BasicServiceType

public BasicServiceType()
Simple constructor, leaves type field set to null.


BasicServiceType

public BasicServiceType(String type)
Simple constructor, sets type field to parameter value.

Parameters:
type - type of service
Method Detail

getIcon

public Image getIcon(int iconKind)
Returns the resource named "icon.int", else null.

Overrides:
getIcon in class ServiceType
Parameters:
iconKind - the kind of icon to return
Returns:
the icon for this service

getDisplayName

public String getDisplayName()
Returns the resource named "name", else the type field stripped of any package prefix (i.e., any characters up to and including the last dot ('.').

Overrides:
getDisplayName in class ServiceType
Returns:
the localized display name of this service

getShortDescription

public String getShortDescription()
Returns the resource named "desc", else null.

Overrides:
getShortDescription in class ServiceType
Returns:
a String representing the short description of this service

init

private void init()


Copyright 2007-2010, multiple authors.
Licensed under the Apache License, Version 2.0, see the NOTICE file for attributions.