com.sun.jersey.server.impl.application
Class CloseableServiceFactory

java.lang.Object
  extended by com.sun.jersey.server.impl.application.CloseableServiceFactory
All Implemented Interfaces:
CloseableService, Injectable<CloseableService>, InjectableProvider<javax.ws.rs.core.Context,java.lang.reflect.Type>

public class CloseableServiceFactory
extends java.lang.Object
implements InjectableProvider<javax.ws.rs.core.Context,java.lang.reflect.Type>, Injectable<CloseableService>, CloseableService

Author:
paulsandoz

Constructor Summary
CloseableServiceFactory(HttpContext context)
           
 
Method Summary
 void add(java.io.Closeable c)
          Add an instance of Closeable that is to be closed when the request goes out of scope.
 void close(HttpContext context)
           
 Injectable getInjectable(ComponentContext ic, javax.ws.rs.core.Context a, java.lang.reflect.Type c)
          Get an injectable.
 ComponentScope getScope()
          Get the scope of the injectable provider.
 CloseableService getValue()
          Get the injectable value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CloseableServiceFactory

public CloseableServiceFactory(@Context
                               HttpContext context)
Method Detail

getScope

public ComponentScope getScope()
Description copied from interface: InjectableProvider
Get the scope of the injectable provider.

Specified by:
getScope in interface InjectableProvider<javax.ws.rs.core.Context,java.lang.reflect.Type>
Returns:
the scope.

getInjectable

public Injectable getInjectable(ComponentContext ic,
                                javax.ws.rs.core.Context a,
                                java.lang.reflect.Type c)
Description copied from interface: InjectableProvider
Get an injectable.

Specified by:
getInjectable in interface InjectableProvider<javax.ws.rs.core.Context,java.lang.reflect.Type>
Parameters:
ic - the injectable context
a - the annotation instance
c - the context instance
Returns:
an Injectable instance, otherwise null if an instance cannot be created.

getValue

public CloseableService getValue()
Description copied from interface: Injectable
Get the injectable value.

Specified by:
getValue in interface Injectable<CloseableService>
Returns:
the injectable value

add

public void add(java.io.Closeable c)
Description copied from interface: CloseableService
Add an instance of Closeable that is to be closed when the request goes out of scope.

Specified by:
add in interface CloseableService
Parameters:
c - the instance of Closeable.

close

public void close(HttpContext context)


Copyright © 2011 Sun Microsystems, Inc. All Rights Reserved.