org.richfaces.application
Interface ServiceReference<T>


public interface ServiceReference<T>

This interface is coupled with ServiceTracker class and provides reference to service implementation, allowing delayed service initialization.

Methods provided by this interface are expected to be called from multiple concurrent threads without any synchronization aids.

Since:
4.0
Author:
Nick Belaevski

Method Summary
 T getService()
          Returns instance of service referenced by this object.
 

Method Detail

getService

T getService()

Returns instance of service referenced by this object.

Calling this method can cause delayed initialization of service. Clients of this class are not expected to store returned service implementation object, so storing reference to the created service object to avoid repeated initialization is the sole responsibility of this class.

Returns:
referenced service implementation object


Copyright © 2010 JBoss, a division of Red Hat, Inc.. All Rights Reserved.