All Downloads are FREE. Search and download functionalities are using the official Maven repository.

ameba.container.grizzly.server.http.websocket.Hk2ComponentProvider Maven / Gradle / Ivy

There is a newer version: 0.1.12
Show newest version
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