Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle ADF Share
11g Release 1 (11.1.1)

E10686-03


oracle.adf.share.services
Interface ServiceRef


public interface ServiceRef

This proxy ensures that services won't have to be known (i.e. their classes don't have to be instantiated), to do the work within the mechanisms of the services framework. This allows the classes to be lazily loaded based on when the client actually needs to use them. At the time they're needed, services will be constructed from ServiceRef's using a 2 argument constructor, with the service file URL, and an enumeration of non comment items found in the service file. Therefore all service developers must provide this constructor. If the service developer wishes, the service file item enumeration may be used to access the remaining content from the service file. But once the constructor returns, all references to it should no longer be held by the service. If information is needed then it should be copied from it before returning from the constructor.


Method Summary
 Services getService()
          This call returns the resolved service class instance specified in the service file.
 java.net.URL getServiceURL()
          Allows the client to interact with the URL without instantiating the service.

 

Method Detail

getServiceURL

java.net.URL getServiceURL()
Allows the client to interact with the URL without instantiating the service.
Returns:
the URL that created this instance of the ServiceRef.

getService

Services getService()
This call returns the resolved service class instance specified in the service file. The type of the object returned depends on the service originally requested from the ServicesFactory. Because it's believed that loading the service will instantiate a significant amount of classes and data initialization, the caller of this method will want to hold on to the actual service instance returned from this point onward. If any checked exception is encountered resolving the impl from the service file, or during class loading, instantiation, (or the constructor), they will be wrapped (as the cause) in a RuntimeException and rethrown.
Returns:
the fully resolved service implementation instance

Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle ADF Share
11g Release 1 (11.1.1)

E10686-03


Copyright © 1997, 2009, Oracle. All rights reserved.