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
Interface Sample

All Superinterfaces:
  AMX, AMXMBeanLogging, NotificationBroadcaster, NotificationEmitter, Singleton, Utility

public interface Sample
extends Utility, AMX, Singleton

Interface for a sample MBean , used as target for sample and test code. Various Attributes of varying types are made available for testing.

Field Summary
`static java.lang.String` | `J2EE_TYPE` The j2eeType as returned by `AMX.getJ2EEType()`.
`static java.lang.String` | `SAMPLE_NOTIFICATION_TYPE` The type of Notification emitted by emitNotification().
`static java.lang.String` | `USER_DATA_KEY` The key to access user data within the Map obtained from Notification.getUserData().

Fields inherited from interface com.sun.appserv.management.base.AMX
`FULL_TYPE_DELIM, GROUP_CONFIGURATION, GROUP_JSR77, GROUP_MONITORING, GROUP_OTHER, GROUP_UTILITY, J2EE_TYPE_KEY, NAME_KEY, NO_NAME, NULL_NAME`

Fields inherited from interface com.sun.appserv.management.base.AMXMBeanLogging
`LOG_RECORD_KEY, LOG_RECORD_NOTIFICATION_TYPE`

Method Summary
`void` | `addAttribute(java.lang.String name, java.lang.Object value)` Add a new Attribute.
`byte[]` | `downloadBytes(int numBytes)`
`void` | `emitNotifications(java.lang.Object data, int numNotifs, long intervalMillis)` Emit 'numNotifs' notifications of type SAMPLE_NOTIFICATION_TYPE at the specified interval.
`void` | `removeAttribute(java.lang.String name)` Remove an Attribute.
`void` | `uploadBytes(byte[] bytes)` For testing bandwidth...

Methods inherited from interface com.sun.appserv.management.base.AMX
`getContainer, getDomainRoot, getFullType, getGroup, getJ2EEType, getName`

Methods inherited from interface com.sun.appserv.management.base.AMXMBeanLogging
`getMBeanEmitLogNotifications, getMBeanLoggerName, getMBeanLogLevel, setMBeanEmitLogNotifications, setMBeanLogLevel`

Methods inherited from interface javax.management.NotificationEmitter
`removeNotificationListener`

Methods inherited from interface javax.management.NotificationBroadcaster
`addNotificationListener, getNotificationInfo, removeNotificationListener`

Field Detail

### J2EE_TYPE

    public static final java.lang.String J2EE_TYPE

  The j2eeType as returned by `AMX.getJ2EEType()`.

  See Also:
    Constant Field Values

### SAMPLE_NOTIFICATION_TYPE

    public static final java.lang.String SAMPLE_NOTIFICATION_TYPE

  The type of Notification emitted by emitNotification().

  See Also:
    Constant Field Values

### USER_DATA_KEY

    public static final java.lang.String USER_DATA_KEY

  The key to access user data within the Map obtained from Notification.getUserData().

  See Also:
    Constant Field Values

Method Detail

### emitNotifications

    public void emitNotifications(java.lang.Object data,
                                  int numNotifs,
                                  long intervalMillis)

  Emit 'numNotifs' notifications of type SAMPLE_NOTIFICATION_TYPE at the specified interval.

  Parameters:
    `data` - arbitrary data which will be placed into the Notification's UserData field.
    `numNotifs` - number of Notifications to issue >= 1
    `intervalMillis` - interval at which Notifications should be issued >= 0

### addAttribute

    public void addAttribute(java.lang.String name,
                             java.lang.Object value)

  Add a new Attribute. After this, the MBeanInfo will contain an MBeanAttributeInfo for this Attribute.

  Parameters:
    `name` -
    `value` -

### removeAttribute

    public void removeAttribute(java.lang.String name)

  Remove an Attribute. After this, the MBeanInfo will no longer contain an MBeanAttributeInfo for this Attribute.

### uploadBytes

    public void uploadBytes(byte[] bytes)

  For testing bandwidth...

### downloadBytes

    public byte[] downloadBytes(int numBytes)

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.