Java EE 5 SDK

com.sun.appserv.management.util.jmx
Interface MBeanServerConnection_Hook.Hook

All Known Implementing Classes:
MBeanServerConnection_Hook.HookImpl
Enclosing class:
MBeanServerConnection_Hook

public static interface MBeanServerConnection_Hook.Hook

Prior to a method being called, preHook() is called; the 2 variants correspond to either no arguments or 1 or more arguments. After a method is called, postHook() is called; the 3 variants correspond to no-arguments-no-return-value, arguments-no-return-value, and arguments-and-return-value methods. The callNameHook() is supplied to see just the ObjectName being used for methods that accept a fully-qualifed ObjectName (but not methods that take a pattern). The callNameHook() may return a different ObjectName which will be used for the invocation. preHook() must return a unique call ID, which will be passed to nameHook() and postHook(). The id identifies the particular calls (useful in a threaded environment).


Method Summary
 void InstanceNotFoundExceptionHook(String methodName, long id, InstanceNotFoundException e)
           
 void IOExceptionHook(long id, IOException e, String operationName, ObjectName objectName, Object[] allArgs)
          Should throw the exception 'e'
 ObjectName nameHook(long id, ObjectName methodName)
           
 void postHook(long id, String methodName)
           
 void postHook(long id, String methodName, Object[] args)
           
 void postHook(long id, String methodName, Object[] args, Object result)
           
 long preHook(String methodName)
           
 long preHook(String methodName, Object[] args)
           
 

Method Detail

preHook

long preHook(String methodName)

preHook

long preHook(String methodName,
             Object[] args)

postHook

void postHook(long id,
              String methodName)

postHook

void postHook(long id,
              String methodName,
              Object[] args)

postHook

void postHook(long id,
              String methodName,
              Object[] args,
              Object result)

nameHook

ObjectName nameHook(long id,
                    ObjectName methodName)
                    throws IOException
Throws:
IOException

IOExceptionHook

void IOExceptionHook(long id,
                     IOException e,
                     String operationName,
                     ObjectName objectName,
                     Object[] allArgs)
                     throws IOException
Should throw the exception 'e'

Throws:
IOException

InstanceNotFoundExceptionHook

void InstanceNotFoundExceptionHook(String methodName,
                                   long id,
                                   InstanceNotFoundException e)
                                   throws InstanceNotFoundException
Throws:
InstanceNotFoundException

Java EE 5 SDK

Submit a bug or feature

Copyright 2006 Sun Microsystems, Inc. All rights reserved.