Class RestletUtils
- java.lang.Object
-
- org.forgerock.openam.rest.service.RestletUtils
-
public class RestletUtils extends Object
Utility methods for dealing with Restlet resources.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static org.restlet.resource.Finderwrap(com.google.inject.Key<? extends org.restlet.resource.ServerResource> resource)Creates a Finder instance that returns the specified instance of a resource.static org.restlet.resource.Finderwrap(Class<? extends org.restlet.resource.ServerResource> resource)Creates a Finder instance that returns an injected instance of a resource.
-
-
-
Method Detail
-
wrap
public static org.restlet.resource.Finder wrap(Class<? extends org.restlet.resource.ServerResource> resource)
Creates a Finder instance that returns an injected instance of a resource. Prevents multiple instances of the same resource class being created unnecessarily.- Parameters:
resource- The type of the resource.- Returns:
- The injected instance.
-
wrap
public static org.restlet.resource.Finder wrap(com.google.inject.Key<? extends org.restlet.resource.ServerResource> resource)
Creates a Finder instance that returns the specified instance of a resource. Prevents multiple instances of the same resource class being created unnecessarily.- Parameters:
resource- The resource.- Returns:
- The injected instance.
-
-