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

## com.sun.management.oss
Interface ManagedEntityKey

All Superinterfaces:
  java.lang.Cloneable, java.io.Serializable, SerializerFactory

All Known Subinterfaces:
  OperationalStatusMonitorKey, PerformanceMonitorKey

public interface ManagedEntityKey
extends java.io.Serializable, java.lang.Cloneable, SerializerFactory

A `ManagedEntityKey` is a unique identifier for a `ManagedEntityValue`.

The Type, ApplicationDN and ApplicationContext are included in `ManagedEntityKey`, because a `primaryKey` is only unique within an application instance as given by the ApplicationDN running in a given naming system as given by the ApplicationContext URL.

Method Summary
`java.lang.Object` | `clone()` Deep copy this key.
`ApplicationContext` | `getApplicationContext()` Get the ApplicationContext which can be used to locate the Application Components in charge of the managed entity referenced by this key.
`java.lang.String` | `getApplicationDN()` The DN of the Application JNDI Naming Context.
`java.lang.Object` | `getPrimaryKey()` Get the primary key.
`java.lang.String` | `getType()` Get the type of the `ManagedEntityValue` referenced by the `ManagedEntityKey`.
`ApplicationContext` | `makeApplicationContext()` Factory method for ApplicationContext
`java.lang.Object` | `makePrimaryKey()` Manufacture a PrimaryKey.
`void` | `setApplicationContext(ApplicationContext ctx)` Set the ApplicationContext.
`void` | `setApplicationDN(java.lang.String applicationDN)` Set the ApplicationDN.
`void` | `setPrimaryKey(java.lang.Object key)` Sets a new value for the primary key.
`void` | `setType(java.lang.String type)` Set a new value for type.

Methods inherited from interface com.sun.management.oss.SerializerFactory
`getSupportedSerializerTypes, makeSerializer`

Method Detail

### clone

    public java.lang.Object clone()

  Deep copy this key.

  Returns:
    deep copy of this key.

### makeApplicationContext

    public ApplicationContext makeApplicationContext()

  Factory method for ApplicationContext

  Returns:
    a newly created ApplicationContext object.

### getApplicationContext

    public ApplicationContext getApplicationContext()

  Get the ApplicationContext which can be used to locate the Application Components in charge of the managed entity referenced by this key.

  Returns:
    the ApplicationContext.

### setApplicationContext

    public void setApplicationContext(ApplicationContext ctx)
                               throws java.lang.IllegalArgumentException

  Set the ApplicationContext.

  Because a key is only unique within a given naming system (as given by the JNDI provider URL) and for a given Application instance ( as given by the ApplicationDN ) the ApplicationContext must be set to uniquely identify a key.

  Parameters:
    `ctx` - the ApplicationContext
  Throws:
    `java.lang.IllegalArgumentException` - if ApplicationContext argument is not valid in some way.

### setApplicationDN

    public void setApplicationDN(java.lang.String applicationDN)
                          throws java.lang.IllegalArgumentException

  Set the ApplicationDN.

  Because a key is only unique within a given naming system (as given by the JNDI provider URL) and for a given Application instance ( as given by the ApplicationDN ) the ApplicationDN must be set to uniquely identify a key.

  Parameters:
    `applicationDN` - the application DN
  Throws:
    `java.lang.IllegalArgumentException` - if applicationDN argument is malformed.

### getApplicationDN

    public java.lang.String getApplicationDN()

  The DN of the Application JNDI Naming Context. The format of this DN is:

  < Optional Deployment dependent Top Context >/ System/ < System Name >/ ApplicatonType/ < Application Type Name >/ Application/ < API Version Number >;< Product Release Number >;< Product Name >

  where the format of the API Version Number and the Product Release Number is:

  < MajorVersionNumber-MinorVersionNumber >

  Returns:
    the ApplicationDN

### getType

    public java.lang.String getType()

  Get the type of the `ManagedEntityValue` referenced by the `ManagedEntityKey`.

  The type is part of `ManagedEntityKey`, because `primaryKey`s can be duplicate between `ManagedEntityValue`, implemented by the same class, but from different type (not java type).

  Returns:
    String entity's type name

### setType

    public void setType(java.lang.String type)
                 throws java.lang.IllegalArgumentException

  Set a new value for type.

  Parameters:
    `type` - the new value for type
  Throws:
    `java.lang.IllegalArgumentException` - if type is not valid.

### getPrimaryKey

    public java.lang.Object getPrimaryKey()

  Get the primary key.

  This is a unique identifier for a Managed Entity within the scope of application context, application DN, and type.

  In case the implementation uses Entity Beans, an implementation may map the primary key to the EJB primary key.

  Returns:
    the primary key

### setPrimaryKey

    public void setPrimaryKey(java.lang.Object key)
                       throws java.lang.IllegalArgumentException

  Sets a new value for the primary key.

  Parameters:
    `key` - the new value for the primary key.
  Throws:
    `java.lang.IllegalArgumentException` - if key is bad in some way.

### makePrimaryKey

    public java.lang.Object makePrimaryKey()

  Manufacture a PrimaryKey.

  Returns:
    a primary key object of the appropriate implementation class. (Note: this is just an empty object, not a unique primary key.)

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