org.eclipse.osgi.internal.serviceregistry
Interface HookContext

All Known Implementing Classes:
WovenClassImpl

public interface HookContext

A callable hook that contains the context for call a collection of hooks. This is effectively a "closure" for calling each hook. The hook context must know the type of the hook object, the method to call on the hook as well as all the parameters which need to be passed to the hook method.


Method Summary
 void call(Object hook, ServiceRegistration<?> hookRegistration)
          Call the specified hook.
 String getHookClassName()
          Return the class name of the hook type supported by this hook context.
 String getHookMethodName()
          Return the hook method name called by this hook context.
 

Method Detail

call

void call(Object hook,
          ServiceRegistration<?> hookRegistration)
          throws Exception
Call the specified hook.

Parameters:
hook - The hook object to call. The hook object must be of the type supported by this hook context. If it is not, then this method will simply return.
hookRegistration - the registration for the hook object
Throws:
Exception - An exception thrown by the hook object.

getHookClassName

String getHookClassName()
Return the class name of the hook type supported by this hook context.

Returns:
The class name of the hook type supported by this hook context.

getHookMethodName

String getHookMethodName()
Return the hook method name called by this hook context.

Returns:
The hook method name called by this hook context.


Copyright © 2007–2014 The Apache Software Foundation. All rights reserved.