public class CloseableServiceFactory extends Object implements InjectableProvider<javax.ws.rs.core.Context,Type>, Injectable<CloseableService>, CloseableService
Constructor and Description |
---|
CloseableServiceFactory(HttpContext context) |
Modifier and Type | Method and Description |
---|---|
void |
add(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,
Type c)
Get an injectable.
|
ComponentScope |
getScope()
Get the scope of the injectable provider.
|
CloseableService |
getValue()
Get the injectable value.
|
public CloseableServiceFactory(@Context HttpContext context)
public ComponentScope getScope()
InjectableProvider
getScope
in interface InjectableProvider<javax.ws.rs.core.Context,Type>
public Injectable getInjectable(ComponentContext ic, javax.ws.rs.core.Context a, Type c)
InjectableProvider
getInjectable
in interface InjectableProvider<javax.ws.rs.core.Context,Type>
ic
- the injectable contexta
- the annotation instancec
- the context instancepublic CloseableService getValue()
Injectable
getValue
in interface Injectable<CloseableService>
public void add(Closeable c)
CloseableService
Closeable
that is to be closed when the
request goes out of scope.add
in interface CloseableService
c
- the instance of Closeable
.public void close(HttpContext context)
Copyright © 2013 Oracle Corporation. All rights reserved.