本文整理汇总了Java中org.glassfish.jersey.server.spi.internal.ValueFactoryProvider类的典型用法代码示例。如果您正苦于以下问题:Java ValueFactoryProvider类的具体用法?Java ValueFactoryProvider怎么用?Java ValueFactoryProvider使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ValueFactoryProvider类属于org.glassfish.jersey.server.spi.internal包,在下文中一共展示了ValueFactoryProvider类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: configure
import org.glassfish.jersey.server.spi.internal.ValueFactoryProvider; //导入依赖的package包/类
@Override
public boolean configure(FeatureContext context) {
context.register(new AbstractBinder() {
@Override
public void configure() {
bind(TokenAuthenticator.class)
.in(Singleton.class);
bind(TokenFactory.class)
.in(Singleton.class);
bind(TokenFactoryProvider.class)
.to(ValueFactoryProvider.class)
.in(Singleton.class);
bind(TokenParamInjectionResolver.class)
.to(new TypeLiteral<InjectionResolver<RobeAuth>>() {
})
.in(Singleton.class);
}
});
return true;
}
示例2: configure
import org.glassfish.jersey.server.spi.internal.ValueFactoryProvider; //导入依赖的package包/类
@Override
protected void configure() {
// bind default Configuration to DSLContext
bindFactory(new DSLContextFactory(configurationMap.values().stream().findFirst().orElse(null)))
.to(DSLContext.class)
.in(RequestScoped.class);
// bind multiple instances of Configuration and ConnectionProvider for Named DSLContext(s)
for (final Configuration configuration : configurationMap.values()) {
bind(configuration).to(Configuration.class);
bind(configuration.connectionProvider())
.to(ConnectionProvider.class);
}
// bind a ValueFactoryProvider for Named DSLContext(s)
bind(new DSLContextValueFactoryProvider(configurationMap))
.to(ValueFactoryProvider.class);
}
示例3: configure
import org.glassfish.jersey.server.spi.internal.ValueFactoryProvider; //导入依赖的package包/类
@Override
protected void configure() {
bind(new RateLimiterFactoryProvider(requestRateLimiterFactory)).to(RateLimiterFactoryProvider.class);
bind(RateLimitingFactoryProvider.class).to(ValueFactoryProvider.class).in(Singleton.class);
bind(RateLimitingFactoryProvider.RateLimitingInjectionResolver.class)
.to(new TypeLiteral<InjectionResolver<RateLimiting>>() {}).in(Singleton.class);
}
示例4: configure
import org.glassfish.jersey.server.spi.internal.ValueFactoryProvider; //导入依赖的package包/类
@Override
protected void configure() {
bind(TestRateLimitingFactoryProvider.class).to(ValueFactoryProvider.class).in(Singleton.class);
bind(TestRateLimitingFactoryProvider.TestRateLimitingInjectionResolver.class).to(
new TypeLiteral<InjectionResolver<RateLimiting>>() {
}
).in(Singleton.class);
}
示例5: configure
import org.glassfish.jersey.server.spi.internal.ValueFactoryProvider; //导入依赖的package包/类
@Override
protected void configure() {
bind(JsonParamValueFactoryProvider.class).to(ValueFactoryProvider.class).in(Singleton.class);
bind(JsonParamValueFactoryProvider.InjectionResolver.class).to(new TypeLiteral<InjectionResolver<JsonParam>>() {
}).in(Singleton.class);
}
示例6: configure
import org.glassfish.jersey.server.spi.internal.ValueFactoryProvider; //导入依赖的package包/类
@Override
protected void configure() {
bind(profile).to(ProfileFactoryBuilder.class);
bind(optProfile).to(OptionalProfileFactoryBuilder.class);
bind(manager).to(ProfileManagerFactoryBuilder.class);
bind(Pac4JProfileValueFactoryProvider.class).to(ValueFactoryProvider.class).in(Singleton.class);
bind(ProfileInjectionResolver.class).to(new TypeLiteral<InjectionResolver<Pac4JProfile>>() {
}).in(Singleton.class);
bind(ProfileManagerInjectionResolver.class).to(new TypeLiteral<InjectionResolver<Pac4JProfileManager>>() {
}).in(Singleton.class);
}
示例7: configure
import org.glassfish.jersey.server.spi.internal.ValueFactoryProvider; //导入依赖的package包/类
@Override
protected void configure() {
bind(CustomAnnotationProvider.class)
.to(ValueFactoryProvider.class)
.in(Singleton.class);
bind(CustomAnnotationResolver.class)
.to(new TypeLiteral<InjectionResolver<CustomAnnotation>>() {
})
.in(Singleton.class);
}
示例8: configure
import org.glassfish.jersey.server.spi.internal.ValueFactoryProvider; //导入依赖的package包/类
@Override protected void configure() {
bind(clientAuthFactory);
bind(automationClientAuthFactory);
bind(userAuthFactory);
bind(AuthValueFactoryProvider.class).to(ValueFactoryProvider.class).in(Singleton.class);
bind(AuthInjectionResolver.class).to(new TypeLiteral<InjectionResolver<Auth>>() {}).in(Singleton.class);
}
示例9: configure
import org.glassfish.jersey.server.spi.internal.ValueFactoryProvider; //导入依赖的package包/类
@Override
protected void configure() {
bind(new ConfigurationFactoryInfo(configuration, dataSource, multiTenantConnectionProvider))
.to(ConfigurationFactoryInfo.class);
bind(ConfigurationFactoryProvider.class).to(ValueFactoryProvider.class).in(Singleton.class);
bind(ConfigurationInjectionResolver.class).to(new TypeLiteral<InjectionResolver<JooqConfiguration>>() {
}).in(Singleton.class);
}
示例10: configure
import org.glassfish.jersey.server.spi.internal.ValueFactoryProvider; //导入依赖的package包/类
@Override
protected void configure()
{
bind(AuthHeaderParamValueFactoryProvider.class)
.to(ValueFactoryProvider.class)
.in(Singleton.class);
bind(UserAuthHeaderParamResolver.class)
.to(new TypeLiteral<InjectionResolver<AuthParam>>() {
})
.in(Singleton.class);
}
示例11: configure
import org.glassfish.jersey.server.spi.internal.ValueFactoryProvider; //导入依赖的package包/类
@Override
protected void configure() {
bindFactory(configPropertiesFactory).to(ConfigProperties.class);
bind(PropertiesValueFactoryProvider.PropertyInjectionResolver.class)
.to(new TypeLiteral<InjectionResolver<Prop>>() {
}).in(Singleton.class);
bind(PropertiesValueFactoryProvider.class)
.to(ValueFactoryProvider.class)
.in(Singleton.class);
}
示例12: configure
import org.glassfish.jersey.server.spi.internal.ValueFactoryProvider; //导入依赖的package包/类
@Override
protected void configure() {
bind(new PrincipalClassProvider<>(principalClass)).to(PrincipalClassProvider.class);
bind(TokenFactoryProvider.class).to(ValueFactoryProvider.class).in(Singleton.class);
bind(TokenParamInjectionResolver.class).to(new TypeLiteral<InjectionResolver<RobeAuth>>() {
}).in(Singleton.class);
}
示例13: bind
import org.glassfish.jersey.server.spi.internal.ValueFactoryProvider; //导入依赖的package包/类
@Override
public void bind(DynamicConfiguration config) {
Injections.addBinding(
Injections.newFactoryBinder(this).to(type).in(Singleton.class),
config);
Injections.addBinding(
Injections.newBinder(this).to(ValueFactoryProvider.class),
config);
}
示例14: configure
import org.glassfish.jersey.server.spi.internal.ValueFactoryProvider; //导入依赖的package包/类
protected void configure() {
bind(PrincipalFactory.class)
.to(PrincipalFactory.class)
.to(new TypeLiteral<Factory<P>>() {})
.in(Singleton.class);
bind(PrincipalValueFactoryProvider.class)
.to(AbstractValueFactoryProvider.class)
.to(ValueFactoryProvider.class)
.in(Singleton.class);
bind(PrincipalInjectionResolver.class)
.to(new TypeLiteral<ParamInjectionResolver<HmacAuth>>() {})
.to(new TypeLiteral<InjectionResolver<HmacAuth>>() {})
.in(Singleton.class);
}
示例15: configure
import org.glassfish.jersey.server.spi.internal.ValueFactoryProvider; //导入依赖的package包/类
@Override
public boolean configure(FeatureContext context) {
context.register(new AbstractBinder() {
@Override
public void configure() {
bind(SingularityMultiMethodAuthenticator.class).to(new TypeLiteral<Authenticator<ContainerRequestContext, SingularityUser>>() {}).in(Singleton.class);
bind(SingularityAuthedUserFactory.class).to(SingularityAuthedUserFactory.class).in(Singleton.class);
bind(SingularityAuthFactoryProvider.class).to(ValueFactoryProvider.class).in(Singleton.class);
bind(SingularityAuthParamInjectionResolver.class).to(new TypeLiteral<InjectionResolver<Auth>>(){}).in(Singleton.class);
}
});
return true;
}