ameba.container.grizzly.server.http.websocket.Hk2ComponentProvider Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ameba-container-grizzly Show documentation
Show all versions of ameba-container-grizzly Show documentation
A useful Java framework grizzly container!
package ameba.container.grizzly.server.http.websocket;
import org.glassfish.hk2.api.ServiceLocator;
import org.glassfish.jersey.internal.inject.Injections;
import org.glassfish.tyrus.core.ComponentProvider;
/**
* @author icode
*/
public class Hk2ComponentProvider extends ComponentProvider {
static ServiceLocator locator;
@Override
public boolean isApplicable(Class> c) {
return true;
}
@Override
public Object create(Class c) {
return Injections.getOrCreate(locator, c);
}
@Override
public boolean destroy(Object o) {
return false;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy