Package org.graylog2.plugin.inject
Class Graylog2Module
java.lang.Object
com.google.inject.AbstractModule
org.graylog2.plugin.inject.Graylog2Module
- All Implemented Interfaces:
com.google.inject.Module
- Direct Known Subclasses:
AuthenticatingRealmModule,AuthorizationOnlyRealmModule,CodecsModule,DatanodeMigrationBindings,DataTieringModule,DecoratorBindings,FieldTypesModule,GenericBindings,IndexerBindings,LookupModule,MessageInputBindings,MessageOutputBindings,ObjectMapperModule,PasswordAlgorithmBindings,PluginModule,PreflightWebModule,RestResourcesModule,RestResourcesSharedModule,SearchFiltersModule,ServerBindings,ServerPreflightChecksModule,StreamsModule,TransportsModule,UnitsModule,WebResourcesModule
public abstract class Graylog2Module
extends com.google.inject.AbstractModule
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddPreflightCheck(Class<? extends PreflightCheck> preflightCheck) protected voidaddStaticReferencedSearch(StaticReferencedSearch referencedSearch) protected voidaddSystemRestResource(Class<?> restResourceClass) Adds given API resource as a system resource.protected com.google.inject.multibindings.MapBinder<String,AlertCondition.Factory> protected com.google.inject.multibindings.MapBinder<AuditEventType,AuditEventFormatter> protected com.google.inject.multibindings.OptionalBinder<AuditEventSender>protected com.google.inject.multibindings.Multibinder<PluginAuditEventTypes>protected com.google.inject.multibindings.MapBinder<String,org.apache.shiro.realm.AuthenticatingRealm> protected com.google.inject.multibindings.MapBinder<String,org.apache.shiro.realm.AuthorizingRealm> protected com.google.inject.multibindings.MapBinder<Class<?>,ClusterConfigValidator> protected com.google.inject.multibindings.MapBinder<String,Codec.Factory<? extends Codec>> protected com.google.inject.multibindings.Multibinder<ConstraintChecker>protected com.google.inject.multibindings.MapBinder<ModelType,EntityWithExcerptFacade<?, ?>> protected com.google.inject.multibindings.MapBinder<String,FilteredMessageOutput> protected Class<?>findInnerClassAnnotatedWith(Class<? extends Annotation> annotationClass, Class<?> containingClass, Class<?> targetClass) protected com.google.inject.multibindings.MapBinder<String,MessageInput.Factory<? extends MessageInput>> protected voidinstallAlertCondition(com.google.inject.multibindings.MapBinder<String, AlertCondition.Factory> alertConditionBinder, Class<? extends AlertCondition> alertConditionClass, Class<? extends AlertCondition.Factory> alertConditionFactoryClass) protected voidinstallAlertConditionWithCustomName(com.google.inject.multibindings.MapBinder<String, AlertCondition.Factory> alertConditionBinder, String identifier, Class<? extends AlertCondition> alertConditionClass, Class<? extends AlertCondition.Factory> alertConditionFactoryClass) protected voidinstallAuditEventFormatter(com.google.inject.multibindings.MapBinder<AuditEventType, AuditEventFormatter> auditEventFormatterMapBinder, AuditEventType auditEventType, Class<? extends AuditEventFormatter> auditEventFormatter) protected voidinstallAuditEventTypes(com.google.inject.multibindings.Multibinder<PluginAuditEventTypes> classMultibinder, Class<? extends PluginAuditEventTypes> auditEventTypesClass) protected voidinstallCodec(com.google.inject.multibindings.MapBinder<String, Codec.Factory<? extends Codec>> mapBinder, Class<? extends Codec> codecClass) protected voidinstallCodec(com.google.inject.multibindings.MapBinder<String, Codec.Factory<? extends Codec>> mapBinder, String name, Class<? extends Codec> codecClass) protected voidinstallCodec(com.google.inject.multibindings.MapBinder<String, Codec.Factory<? extends Codec>> mapBinder, String name, Class<? extends Codec> codecClass, Class<? extends Codec.Config> configClass, Class<? extends Codec.Factory<? extends Codec>> factoryClass) protected <T extends MessageInput>
voidinstallInput(com.google.inject.multibindings.MapBinder<String, MessageInput.Factory<? extends MessageInput>> inputMapBinder, Class<T> target) protected <T extends MessageInput>
voidinstallInput(com.google.inject.multibindings.MapBinder<String, MessageInput.Factory<? extends MessageInput>> inputMapBinder, Class<T> target, Class<? extends MessageInput.Factory<T>> targetFactory) protected voidinstallLookupCache(String name, Class<? extends LookupCache> cacheClass, Class<? extends LookupCache.Factory> factoryClass, Class<? extends LookupCacheConfiguration> configClass) protected voidinstallLookupDataAdapter(String name, Class<? extends LookupDataAdapter> adapterClass, Class<? extends LookupDataAdapter.Factory> factoryClass, Class<? extends LookupDataAdapterConfiguration> configClass) protected voidinstallLookupDataAdapter2(String name, Class<? extends LookupDataAdapter> adapterClass, Class<? extends LookupDataAdapter.Factory2> factoryClass, Class<? extends LookupDataAdapterConfiguration> configClass) protected <T extends MessageOutput>
voidinstallOutput(com.google.inject.multibindings.MapBinder<String, MessageOutput.Factory<? extends MessageOutput>> outputMapBinder, Class<T> target) protected <T extends MessageOutput>
voidinstallOutput(com.google.inject.multibindings.MapBinder<String, MessageOutput.Factory<? extends MessageOutput>> outputMapBinder, Class<T> target, Class<? extends MessageOutput.Factory<T>> targetFactory) protected <T extends MessageOutput>
voidinstallOutput2(com.google.inject.multibindings.MapBinder<String, MessageOutput.Factory2<? extends MessageOutput>> outputMapBinder, Class<T> target, Class<? extends MessageOutput.Factory2<T>> targetFactory) protected voidinstallPermissions(com.google.inject.multibindings.Multibinder<PluginPermissions> classMultibinder, Class<? extends PluginPermissions> permissionsClass) protected voidinstallRetentionStrategy(com.google.inject.multibindings.MapBinder<String, RetentionStrategy> mapBinder, Class<? extends RetentionStrategy> target) protected voidinstallRotationStrategy(com.google.inject.multibindings.MapBinder<String, RotationStrategy> mapBinder, Class<? extends RotationStrategy> target) protected voidinstallSearchResponseDecorator(com.google.inject.multibindings.MapBinder<String, SearchResponseDecorator.Factory> searchResponseDecoratorBinder, Class<? extends SearchResponseDecorator> searchResponseDecoratorClass, Class<? extends SearchResponseDecorator.Factory> searchResponseDecoratorFactoryClass) protected voidinstallTransport(com.google.inject.multibindings.MapBinder<String, Transport.Factory<? extends Transport>> mapBinder, String name, Class<? extends Transport> transportClass) protected voidinstallTransport(com.google.inject.multibindings.MapBinder<String, Transport.Factory<? extends Transport>> mapBinder, String name, Class<? extends Transport> transportClass, Class<? extends Transport.Config> configClass, Class<? extends Transport.Factory<? extends Transport>> factoryClass) protected voidinstallViewResolver(String name, Class<? extends ViewResolver> resolverClass) protected com.google.inject.multibindings.Multibinder<com.fasterxml.jackson.databind.jsontype.NamedType>Prefer usingregisterJacksonSubtype(Class)orregisterJacksonSubtype(Class, String).protected com.google.inject.multibindings.Multibinder<Class>protected com.google.inject.multibindings.Multibinder<Class<? extends jakarta.ws.rs.container.ContainerResponseFilter>>protected com.google.inject.multibindings.Multibinder<Class<? extends jakarta.ws.rs.container.DynamicFeature>>protected com.google.inject.multibindings.Multibinder<Class<? extends jakarta.ws.rs.ext.ExceptionMapper>>protected com.google.inject.multibindings.MapBinder<String,LookupCache.Factory> protected com.google.inject.multibindings.MapBinder<String,LookupDataAdapter.Factory> protected com.google.inject.multibindings.MapBinder<String,LookupDataAdapter.Factory2> protected com.google.inject.multibindings.Multibinder<Migration>protected com.google.inject.multibindings.MapBinder<String,MessageOutput.Factory<? extends MessageOutput>> protected com.google.inject.multibindings.MapBinder<String,MessageOutput.Factory2<? extends MessageOutput>> protected com.google.inject.multibindings.MapBinder<String,PasswordAlgorithm> protected com.google.inject.multibindings.Multibinder<PluginPermissions>protected com.google.inject.multibindings.MapBinder<String,PreflightCheck> protected voidregisterJacksonSubtype(Class<?> klass) Use this if the class itself is annotated byJsonTypeNameinstead of explicitly given.protected voidregisterJacksonSubtype(Class<?> klass, String name) Use this if the class does not have aJsonTypeNameannotation.protected com.google.inject.multibindings.MapBinder<String,RetentionStrategy> protected com.google.inject.multibindings.MapBinder<String,RotationStrategy> protected com.google.inject.multibindings.MapBinder<String,SearchResponseDecorator.Factory> protected com.google.inject.multibindings.Multibinder<com.google.common.util.concurrent.Service>protected com.google.inject.multibindings.Multibinder<StaticReferencedSearch>protected com.google.inject.multibindings.Multibinder<StreamDeletionGuard>protected com.google.inject.multibindings.MapBinder<String,Transport.Factory<? extends Transport>> protected com.google.inject.multibindings.MapBinder<String,ViewResolver> Methods inherited from class com.google.inject.AbstractModule
addError, addError, addError, bind, bind, bind, bindConstant, binder, bindInterceptor, bindListener, bindListener, bindScope, configure, configure, convertToTypes, currentStage, getMembersInjector, getMembersInjector, getProvider, getProvider, install, requestInjection, requestInjection, requestStaticInjection, requireBinding, requireBinding
-
Field Details
-
SYSTEM_REST_RESOURCES
- See Also:
-
-
Constructor Details
-
Graylog2Module
public Graylog2Module()
-
-
Method Details
-
installTransport
-
installTransport
protected void installTransport(com.google.inject.multibindings.MapBinder<String, Transport.Factory<? extends Transport>> mapBinder, String name, Class<? extends Transport> transportClass, Class<? extends Transport.Config> configClass, Class<? extends Transport.Factory<? extends Transport>> factoryClass) -
installCodec
protected void installCodec(com.google.inject.multibindings.MapBinder<String, Codec.Factory<? extends Codec>> mapBinder, Class<? extends Codec> codecClass) -
installCodec
-
installCodec
protected void installCodec(com.google.inject.multibindings.MapBinder<String, Codec.Factory<? extends Codec>> mapBinder, String name, Class<? extends Codec> codecClass, Class<? extends Codec.Config> configClass, Class<? extends Codec.Factory<? extends Codec>> factoryClass) -
findInnerClassAnnotatedWith
@Nullable protected Class<?> findInnerClassAnnotatedWith(Class<? extends Annotation> annotationClass, Class<?> containingClass, Class<?> targetClass) -
codecMapBinder
protected com.google.inject.multibindings.MapBinder<String,Codec.Factory<? extends Codec>> codecMapBinder() -
transportMapBinder
protected com.google.inject.multibindings.MapBinder<String,Transport.Factory<? extends Transport>> transportMapBinder() -
inputsMapBinder
protected com.google.inject.multibindings.MapBinder<String,MessageInput.Factory<? extends MessageInput>> inputsMapBinder() -
rotationStrategiesMapBinder
protected com.google.inject.multibindings.MapBinder<String,RotationStrategy> rotationStrategiesMapBinder() -
retentionStrategyMapBinder
protected com.google.inject.multibindings.MapBinder<String,RetentionStrategy> retentionStrategyMapBinder() -
installRotationStrategy
protected void installRotationStrategy(com.google.inject.multibindings.MapBinder<String, RotationStrategy> mapBinder, Class<? extends RotationStrategy> target) -
installRetentionStrategy
protected void installRetentionStrategy(com.google.inject.multibindings.MapBinder<String, RetentionStrategy> mapBinder, Class<? extends RetentionStrategy> target) -
installInput
protected <T extends MessageInput> void installInput(com.google.inject.multibindings.MapBinder<String, MessageInput.Factory<? extends MessageInput>> inputMapBinder, Class<T> target, Class<? extends MessageInput.Factory<T>> targetFactory) -
installInput
protected <T extends MessageInput> void installInput(com.google.inject.multibindings.MapBinder<String, MessageInput.Factory<? extends MessageInput>> inputMapBinder, Class<T> target) -
outputsMapBinder
protected com.google.inject.multibindings.MapBinder<String,MessageOutput.Factory<? extends MessageOutput>> outputsMapBinder() -
installOutput
protected <T extends MessageOutput> void installOutput(com.google.inject.multibindings.MapBinder<String, MessageOutput.Factory<? extends MessageOutput>> outputMapBinder, Class<T> target, Class<? extends MessageOutput.Factory<T>> targetFactory) -
outputsMapBinder2
protected com.google.inject.multibindings.MapBinder<String,MessageOutput.Factory2<? extends MessageOutput>> outputsMapBinder2() -
installOutput2
protected <T extends MessageOutput> void installOutput2(com.google.inject.multibindings.MapBinder<String, MessageOutput.Factory2<? extends MessageOutput>> outputMapBinder, Class<T> target, Class<? extends MessageOutput.Factory2<T>> targetFactory) -
installOutput
protected <T extends MessageOutput> void installOutput(com.google.inject.multibindings.MapBinder<String, MessageOutput.Factory<? extends MessageOutput>> outputMapBinder, Class<T> target) -
filteredOutputsMapBinder
protected com.google.inject.multibindings.MapBinder<String,FilteredMessageOutput> filteredOutputsMapBinder() -
permissionsBinder
-
installPermissions
protected void installPermissions(com.google.inject.multibindings.Multibinder<PluginPermissions> classMultibinder, Class<? extends PluginPermissions> permissionsClass) -
auditEventTypesBinder
protected com.google.inject.multibindings.Multibinder<PluginAuditEventTypes> auditEventTypesBinder() -
installAuditEventTypes
protected void installAuditEventTypes(com.google.inject.multibindings.Multibinder<PluginAuditEventTypes> classMultibinder, Class<? extends PluginAuditEventTypes> auditEventTypesClass) -
auditEventFormatterMapBinder
protected com.google.inject.multibindings.MapBinder<AuditEventType,AuditEventFormatter> auditEventFormatterMapBinder() -
installAuditEventFormatter
protected void installAuditEventFormatter(com.google.inject.multibindings.MapBinder<AuditEventType, AuditEventFormatter> auditEventFormatterMapBinder, AuditEventType auditEventType, Class<? extends AuditEventFormatter> auditEventFormatter) -
auditEventSenderBinder
-
jerseyDynamicFeatureBinder
@Nonnull protected com.google.inject.multibindings.Multibinder<Class<? extends jakarta.ws.rs.container.DynamicFeature>> jerseyDynamicFeatureBinder() -
jerseyContainerResponseFilterBinder
@Nonnull protected com.google.inject.multibindings.Multibinder<Class<? extends jakarta.ws.rs.container.ContainerResponseFilter>> jerseyContainerResponseFilterBinder() -
jerseyExceptionMapperBinder
@Nonnull protected com.google.inject.multibindings.Multibinder<Class<? extends jakarta.ws.rs.ext.ExceptionMapper>> jerseyExceptionMapperBinder() -
jerseyAdditionalComponentsBinder
@Nonnull protected com.google.inject.multibindings.Multibinder<Class> jerseyAdditionalComponentsBinder() -
serviceBinder
protected com.google.inject.multibindings.Multibinder<com.google.common.util.concurrent.Service> serviceBinder() -
passwordAlgorithmBinder
protected com.google.inject.multibindings.MapBinder<String,PasswordAlgorithm> passwordAlgorithmBinder() -
authenticationRealmBinder
protected com.google.inject.multibindings.MapBinder<String,org.apache.shiro.realm.AuthenticatingRealm> authenticationRealmBinder() -
authorizationOnlyRealmBinder
protected com.google.inject.multibindings.MapBinder<String,org.apache.shiro.realm.AuthorizingRealm> authorizationOnlyRealmBinder() -
preflightChecksBinder
-
addPreflightCheck
-
searchResponseDecoratorBinder
protected com.google.inject.multibindings.MapBinder<String,SearchResponseDecorator.Factory> searchResponseDecoratorBinder() -
installSearchResponseDecorator
protected void installSearchResponseDecorator(com.google.inject.multibindings.MapBinder<String, SearchResponseDecorator.Factory> searchResponseDecoratorBinder, Class<? extends SearchResponseDecorator> searchResponseDecoratorClass, Class<? extends SearchResponseDecorator.Factory> searchResponseDecoratorFactoryClass) -
alertConditionBinder
protected com.google.inject.multibindings.MapBinder<String,AlertCondition.Factory> alertConditionBinder() -
installAlertCondition
protected void installAlertCondition(com.google.inject.multibindings.MapBinder<String, AlertCondition.Factory> alertConditionBinder, Class<? extends AlertCondition> alertConditionClass, Class<? extends AlertCondition.Factory> alertConditionFactoryClass) -
installAlertConditionWithCustomName
protected void installAlertConditionWithCustomName(com.google.inject.multibindings.MapBinder<String, AlertCondition.Factory> alertConditionBinder, String identifier, Class<? extends AlertCondition> alertConditionClass, Class<? extends AlertCondition.Factory> alertConditionFactoryClass) -
lookupCacheBinder
-
installLookupCache
protected void installLookupCache(String name, Class<? extends LookupCache> cacheClass, Class<? extends LookupCache.Factory> factoryClass, Class<? extends LookupCacheConfiguration> configClass) -
lookupDataAdapterBinder
protected com.google.inject.multibindings.MapBinder<String,LookupDataAdapter.Factory> lookupDataAdapterBinder() -
lookupDataAdapterBinder2
protected com.google.inject.multibindings.MapBinder<String,LookupDataAdapter.Factory2> lookupDataAdapterBinder2() -
installLookupDataAdapter
protected void installLookupDataAdapter(String name, Class<? extends LookupDataAdapter> adapterClass, Class<? extends LookupDataAdapter.Factory> factoryClass, Class<? extends LookupDataAdapterConfiguration> configClass) -
installLookupDataAdapter2
protected void installLookupDataAdapter2(String name, Class<? extends LookupDataAdapter> adapterClass, Class<? extends LookupDataAdapter.Factory2> factoryClass, Class<? extends LookupDataAdapterConfiguration> configClass) -
jacksonSubTypesBinder
protected com.google.inject.multibindings.Multibinder<com.fasterxml.jackson.databind.jsontype.NamedType> jacksonSubTypesBinder()Prefer usingregisterJacksonSubtype(Class)orregisterJacksonSubtype(Class, String). -
registerJacksonSubtype
Use this if the class itself is annotated byJsonTypeNameinstead of explicitly given.- Parameters:
klass-
-
registerJacksonSubtype
Use this if the class does not have aJsonTypeNameannotation.- Parameters:
klass-name-
-
migrationsBinder
-
entityFacadeBinder
protected com.google.inject.multibindings.MapBinder<ModelType,EntityWithExcerptFacade<?, entityFacadeBinder()?>> -
constraintCheckerBinder
-
addSystemRestResource
Adds given API resource as a system resource. This should not be used from plugins! Plugins should usePluginModule.addRestResource(Class)instead to ensure the addition of the path prefix.- Parameters:
restResourceClass- the resource to add
-
clusterConfigMapBinder
protected com.google.inject.multibindings.MapBinder<Class<?>,ClusterConfigValidator> clusterConfigMapBinder() -
viewResolverBinder
-
installViewResolver
-
addStaticReferencedSearch
-
staticReferencedSearchBinder
protected com.google.inject.multibindings.Multibinder<StaticReferencedSearch> staticReferencedSearchBinder() -
streamDeletionGuardBinder
protected com.google.inject.multibindings.Multibinder<StreamDeletionGuard> streamDeletionGuardBinder()
-