felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas Diesler (JIRA)" <j...@apache.org>
Subject [jira] Created: (FELIX-1804) Consider adding an Interceptor API
Date Mon, 26 Oct 2009 08:03:59 GMT
Consider adding an Interceptor API
----------------------------------

                 Key: FELIX-1804
                 URL: https://issues.apache.org/jira/browse/FELIX-1804
             Project: Felix
          Issue Type: Improvement
          Components: Framework
    Affects Versions: felix-2.0.1
            Reporter: Thomas Diesler


Please consider adding a bundle state change interceptor API. For more background on this,
please have a look at

http://jbossosgi.blogspot.com/2009/10/extender-pattern-vs-lifecycle.html 

A possible API could look like this

{code:java}
    void setBundleStateAndNotify(BundleImpl bundle, int state)
    {
        synchronized (m_bundleLock)
        {
           if (interceptor != null)
              interceptor.processStateChange(bundle, state);

            bundle.__setState(state);
            m_bundleLock.notifyAll();
        }
    }
{code}

{code:java}
    interface BundleStateInterceptor()
    {
       void processStateChange(Bundle bundle, int state);   
    }
{code}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message