Package org.apache.avalon.excalibur.monitor

Examples of org.apache.avalon.excalibur.monitor.Resource


    /**
     * Find a monitored resource.  If no resource is available, return null
     */
    public final Resource getResource( final String key )
    {
        final Resource resource = super.getResource( key );
        if( resource != null )
        {
            final Long lastModified = (Long)m_lastModified.get( key );

            if( lastModified != null )
            {
                resource.testModifiedAfter( lastModified.longValue() );
            }

            m_lastModified.put( key,
                                new Long( System.currentTimeMillis() ) );
        }
View Full Code Here


        synchronized( m_resources )
        {
            final String resourceKey = resource.getResourceKey();
            if( m_resources.containsKey( resourceKey ) )
            {
                final Resource original =
                    (Resource)m_resources.get( resourceKey );
                original.addPropertyChangeListenersFrom( resource );
            }
            else
            {
                m_resources.put( resourceKey, resource );
            }
View Full Code Here

     */
    public final void removeResource( final String key )
    {
        synchronized( m_resources )
        {
            final Resource resource =
                (Resource)m_resources.remove( key );
            resource.removeAllPropertyChangeListeners();
        }
    }
View Full Code Here

    /**
     * Find a monitored resource.  If no resource is available, return null
     */
    public final Resource getResource( final String key )
    {
        final Resource resource = super.getResource( key );
        if( resource != null )
        {
            final Long lastModified = (Long)m_lastModified.get( key );

            if( lastModified != null )
            {
                resource.testModifiedAfter( lastModified.longValue() );
            }

            m_lastModified.put( key,
                                new Long( System.currentTimeMillis() ) );
        }
View Full Code Here

        synchronized( m_resources )
        {
            final String resourceKey = resource.getResourceKey();
            if( m_resources.containsKey( resourceKey ) )
            {
                final Resource original =
                    (Resource)m_resources.get( resourceKey );
                original.addPropertyChangeListenersFrom( resource );
            }
            else
            {
                m_resources.put( resourceKey, resource );
            }
View Full Code Here

     */
    public final void removeResource( final String key )
    {
        synchronized( m_resources )
        {
            final Resource resource =
                (Resource)m_resources.remove( key );
            resource.removeAllPropertyChangeListeners();
        }
    }
View Full Code Here

    /**
     * Find a monitored resource.  If no resource is available, return null
     */
    public final Resource getResource( final String key )
    {
        final Resource resource = super.getResource( key );
        if( resource != null )
        {
            final Long lastModified = (Long)m_lastModified.get( key );

            if( lastModified != null )
            {
                resource.testModifiedAfter( lastModified.longValue() );
            }

            m_lastModified.put( key,
                                new Long( System.currentTimeMillis() ) );
        }
View Full Code Here

        synchronized( m_resources )
        {
            final String resourceKey = resource.getResourceKey();
            if( m_resources.containsKey( resourceKey ) )
            {
                final Resource original =
                    (Resource)m_resources.get( resourceKey );
                original.addPropertyChangeListenersFrom( resource );
            }
            else
            {
                m_resources.put( resourceKey, resource );
            }
View Full Code Here

     */
    public final void removeResource( final String key )
    {
        synchronized( m_resources )
        {
            final Resource resource =
                (Resource)m_resources.remove( key );
            resource.removeAllPropertyChangeListeners();
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.avalon.excalibur.monitor.Resource

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.