com.sun.jdmk.interceptor
Interface MBeanServerInterceptorWrapper.Controller

All Known Subinterfaces:
MBeanInterceptorWrapper.Controller
Enclosing class:
MBeanServerInterceptorWrapper

public static interface MBeanServerInterceptorWrapper.Controller

This interface is called before and after each operation is invoked on the wrapped interceptor.

Since:
Java DMK 5.0
See Also:
MBeanServerInterceptorWrapper

Field Summary
static int CREATE
          This constant indicates the type of operation.
static int GET
          This constant indicates the type of operation.
static int INFO
          This constant indicates the type of operation.
static int INVOKE
          This constant indicates the type of operation.
static int LISTEN
          This constant indicates the type of operation.
static int QUERY
          This constant indicates the type of operation.
static int REGISTER
          This constant indicates the type of operation.
static int SET
          This constant indicates the type of operation.
static int UNREGISTER
          This constant indicates the type of operation.
 
Method Summary
 Object beginOperation(int operationType, String operationName, ObjectName mbeanName)
          This method is called before invoking the operation on the wrapped interceptor.
 void endOperation(Object handle, int operationType, String operationName, ObjectName mbeanName)
          This method is called when the operation invoked on the wrapped interceptor is completed.
 

Field Detail

CREATE

static final int CREATE
This constant indicates the type of operation.

See Also:
Constant Field Values

REGISTER

static final int REGISTER
This constant indicates the type of operation.

See Also:
Constant Field Values

UNREGISTER

static final int UNREGISTER
This constant indicates the type of operation.

See Also:
Constant Field Values

GET

static final int GET
This constant indicates the type of operation.

See Also:
Constant Field Values

SET

static final int SET
This constant indicates the type of operation.

See Also:
Constant Field Values

INVOKE

static final int INVOKE
This constant indicates the type of operation.

See Also:
Constant Field Values

QUERY

static final int QUERY
This constant indicates the type of operation.

See Also:
Constant Field Values

LISTEN

static final int LISTEN
This constant indicates the type of operation.

See Also:
Constant Field Values

INFO

static final int INFO
This constant indicates the type of operation.

See Also:
Constant Field Values
Method Detail

beginOperation

Object beginOperation(int operationType,
                      String operationName,
                      ObjectName mbeanName)
                      throws JMRuntimeException
This method is called before invoking the operation on the wrapped interceptor.

Parameters:
operationType - Type of the operation invoked.
operationName - Name of the operation invoked through the MBeanServerInterceptor interface. When the operation is invoke, operationName corresponds to the real operation name as passed to the invoke method.
mbeanName - Name of the MBean on which the operation is invoked. This name can be null for those operations that do not apply to any specific MBean (like getMBeanCount).
Returns:
A handle that will be passed to endOperation when the operation invoked on the wrapped interceptor is completed. This handle can be null if it is not needed.
Throws:
JMRuntimeException - if a runtime exception is thrown, the operation is aborted and endOperation is not called.
This method is not expected to throw any RuntimeException but JMRuntimeExceptions. However this rule is not enforced. The results caused by throwing anything but JMRuntimeException are undefined and MBeanServer implementation specific.

endOperation

void endOperation(Object handle,
                  int operationType,
                  String operationName,
                  ObjectName mbeanName)
This method is called when the operation invoked on the wrapped interceptor is completed.

This method is called whatever the result of the invoked operation was, even if an exception was thrown. The only case where endOperation is not called is when beginOperation threw an exception.

This method is not expected to throw any RuntimeException: however this rule is not enforced. The results caused by throwing a RuntimeException are undefined and MBeanServer implementation specific.

Parameters:
handle - The handle returned by beginOperation
operationType - Type of the operation invoked.
operationName - Name of the operation invoked through the MBeanServerInterceptor interface. When the operation is invoke, operationName corresponds to the real operation name as passed to the invoke method.
mbeanName - Name of the MBean on which the operation is invoked. This name can be null for those operations that do not apply to any specific MBean (like getMBeanCount).

Open Source build 02
opendmk-1.0-b02 2007.10.01_19:17:46_MEST

Copyright 1998-2007 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.