|
GigaSpaces XAP 9.7.2 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.sun.jini.loader.pref.internal.PreferredResources
public final class PreferredResources
Internal data structure which holds preference information for a
preferred class loader. This utility is used only by the preferred
class loader provider and is not intended to be a public API.
A preferred resources object is created from an input stream which
is formatted according to the Preferred List Syntax which is
defined in the specification for
net.jini.loader.pref.PreferredClassProvider
Preferred resources instances hold preferred list expression data
and the preferred state for the resources contained in a given
preferred class loader.
Field Summary | |
---|---|
static int |
NAME_NO_PREFERENCE
Constant value that indicates that there is no preference value for a given name. |
static int |
NAME_NOT_PREFERRED
Constant value that indicates that the resource for a given name is known to be not preferred. |
static int |
NAME_PREFERRED
Constant value that indicates that a given name is preferred. |
static int |
NAME_PREFERRED_RESOURCE_EXISTS
Constant value that indicates that a given resource is preferred. |
Constructor Summary | |
---|---|
PreferredResources(InputStream in)
Create a preference object from a stream of formatted preference syntax. |
Method Summary | |
---|---|
Boolean |
getDefaultPreference()
Returns the preference setting that will be applied to names which have no explicit preference setting in contained preference settings. |
int |
getNameState(String name,
boolean isClass)
Searches the preference maps to determine the preference state of the named resource. |
Boolean |
getWildcardPreference(String name)
Return the boolean value of the most specific wild card (package and namespace) expression which matches name . |
void |
setNameState(String name,
int prefState)
Enable MarshalInputStream to optimize preference information: permits complete name expressions to be added for names that only match wild-card expressions. |
void |
write(OutputStream out)
Write the preferences to the specified OutputStream using the preference list syntax. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int NAME_NO_PREFERENCE
public static final int NAME_NOT_PREFERRED
public static final int NAME_PREFERRED
public static final int NAME_PREFERRED_RESOURCE_EXISTS
Constructor Detail |
---|
public PreferredResources(InputStream in) throws IOException
IOException
PreferredResources
Method Detail |
---|
public void write(OutputStream out) throws IOException
out
- the stream to which formatted preference information
will be written
IOException
- if an error occurs while writing to the streampublic Boolean getDefaultPreference()
public void setNameState(String name, int prefState) throws IOException
name
- the name for which preferred state will be setprefState
- the preferred state for the given name
IOException
- if the name length is zero lengthpublic int getNameState(String name, boolean isClass) throws IOException
name
- isClass
- whether the given name
refers to a
class resource
IOException
- if an error occurs getting the state for
the supplied namepublic Boolean getWildcardPreference(String name)
name
. Package preferences are always more
specific than namespace preferences.
name
- the resource name to which the returned boolean
value will apply
Boolean.TRUE/code> if name
is
preferred. Boolean.FALSE
is it is
not. null
if there is no wildcard preference for
the name.
|
GigaSpaces XAP 9.7.2 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |