Overview | Package | Class | Tree | Deprecated | Index | Help
| J2EE1.4 SDK
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.sun.appserv.management.base
Class MapCapableBase

    java.lang.Object
      com.sun.appserv.management.base.MapCapableBase

All Implemented Interfaces:
  MapCapable

Direct Known Subclasses:
  DeploymentProgressImpl, DeploymentSourceImpl, OperationStatusBase

public abstract class MapCapableBase
extends java.lang.Object
implements MapCapable

Base impl class.

Field Summary

Fields inherited from interface com.sun.appserv.management.base.MapCapable
`MAP_CAPABLE_CLASS_NAME_KEY`

Constructor Summary
`protected` | `MapCapableBase(java.util.Map m, java.lang.String className)`
`protected` | `MapCapableBase(java.lang.String className)`

Method Summary
`java.util.Map` | `asMap()` To be capable of being serialized and deserialized by generic clients, the following rules must be observed for the resulting Map.
`protected void` | `checkInJavaUtil(java.lang.Object o)`
`protected void` | `checkLegalObject(java.lang.Object o)`
`protected void` | `checkLegalObject(java.lang.Object o, boolean allowMapCapable)` We restrict the set of legal types to: OpenTypes Collection whose values meet these restrictions arrays whose values meet these restrictions Map whose keys and values meet these restrictions Throwable which are part of java or javax MapCapable whose Map meets these restrictions (assuming allowMapCapable is true)
`protected static void` | `checkValidType(java.util.Map m, java.lang.String requiredType)`
`boolean` | `equals(java.lang.Object o)`
`protected boolean` | `getboolean(java.lang.String key)`
`protected java.lang.Boolean` | `getBoolean(java.lang.String key)`
`protected java.lang.Byte` | `getByte(java.lang.String key)`
`protected java.lang.Object` | `getField(java.lang.String key)`
`protected java.io.File` | `getFile(java.lang.String key)`
`protected java.lang.Integer` | `getInteger(java.lang.String key)`
`protected java.util.Map` | `getMap(java.lang.String key)`
`java.lang.String` | `getMapClassName()` Return the type name which will be paired with MAP_CAPABLE_CLASS_NAME_KEY.
`protected java.lang.Object` | `getObject(java.lang.String key)`
`protected java.lang.String` | `getString(java.lang.String key)`
`protected java.lang.String[]` | `getStringArray(java.lang.String key)`
`protected void` | `illegalObject(java.lang.Object o)`
`void` | `makeImmutable()` Make this Object immutable.
`protected void` | `putAll(java.util.Map m)` Add fields one-by-one so we can check compliance with OpenTypes
`void` | `putField(java.lang.String key, java.lang.Object value)` Add a field to the object.
`protected java.lang.Object` | `putFieldHook(java.lang.String key, java.lang.Object value)`
`java.lang.String` | `toString()`
`protected abstract boolean` | `validate()` Return true if internal state is valid, false otherwise.
`protected boolean` | `validateNullOrOfType(java.lang.String key, java.lang.Class theClass)`
`protected void` | `validateThrow()`

Methods inherited from class java.lang.Object
`clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### MapCapableBase

    protected MapCapableBase(java.lang.String className)

### MapCapableBase

    protected MapCapableBase(java.util.Map m,
                             java.lang.String className)

Method Detail

### checkValidType

    protected static void checkValidType(java.util.Map m,
                                         java.lang.String requiredType)

### validate

    protected abstract boolean validate()

  Return true if internal state is valid, false otherwise.

### getMapClassName

    public java.lang.String getMapClassName()

  Return the type name which will be paired with MAP_CAPABLE_CLASS_NAME_KEY.

  Specified by:
    `getMapClassName` in interface `MapCapable`

### illegalObject

    protected void illegalObject(java.lang.Object o)

### checkInJavaUtil

    protected void checkInJavaUtil(java.lang.Object o)

### checkLegalObject

    protected final void checkLegalObject(java.lang.Object o,
                                          boolean allowMapCapable)

  We restrict the set of legal types to:
  - OpenTypes
  - Collection whose values meet these restrictions
  - arrays whose values meet these restrictions
  - Map whose keys and values meet these restrictions
  - Throwable which are part of java or javax
  - MapCapable whose Map meets these restrictions (assuming allowMapCapable is true)

### checkLegalObject

    protected final void checkLegalObject(java.lang.Object o)

### validateNullOrOfType

    protected boolean validateNullOrOfType(java.lang.String key,
                                           java.lang.Class theClass)

### validateThrow

    protected final void validateThrow()

### asMap

    public final java.util.Map asMap()

  Description copied from interface: `MapCapable`
  To be capable of being serialized and deserialized by generic clients, the following rules must be observed for the resulting Map.

  The Map itself and any items it references, directly or indirectly must be of a class of one of the following:

  - any JMX OpenType
  - any serializable Collection in java.util whose items meet these rules
  - arrays of items whose values meet these rules
  - any Throwable found in java. or javax.
  - any MapCapable which can produce a Map following these rules

  Specified by:
    `asMap` in interface `MapCapable`
  Returns:
    an equivalent Map representing the original object.

### makeImmutable

    public void makeImmutable()

  Make this Object immutable.

### putField

    public void putField(java.lang.String key,
                         java.lang.Object value)

  Add a field to the object. The Object can choose to reject addition of the field.

### putFieldHook

    protected java.lang.Object putFieldHook(java.lang.String key,
                                            java.lang.Object value)

### putAll

    protected void putAll(java.util.Map m)

  Add fields one-by-one so we can check compliance with OpenTypes

### getField

    protected java.lang.Object getField(java.lang.String key)

### getObject

    protected final java.lang.Object getObject(java.lang.String key)

### getString

    protected final java.lang.String getString(java.lang.String key)

### getStringArray

    protected final java.lang.String[] getStringArray(java.lang.String key)

### getBoolean

    protected final java.lang.Boolean getBoolean(java.lang.String key)

### getByte

    protected final java.lang.Byte getByte(java.lang.String key)

### getboolean

    protected final boolean getboolean(java.lang.String key)

### getInteger

    protected final java.lang.Integer getInteger(java.lang.String key)

### getMap

    protected final java.util.Map getMap(java.lang.String key)

### getFile

    protected final java.io.File getFile(java.lang.String key)

### equals

    public boolean equals(java.lang.Object o)

### toString

    public java.lang.String toString()

Overview | Package | Class | Tree | Deprecated | Index | Help
| J2EE1.4 SDK
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Submit a bug or feature

Copyright 2003 Sun Microsystems, Inc. All rights reserved.