Tabnine Logo
ShiroModule.destroy
Code IndexAdd Tabnine to your IDE (free)

How to use
destroy
method
in
org.apache.shiro.guice.ShiroModule

Best Java code snippets using org.apache.shiro.guice.ShiroModule.destroy (Showing top 3 results out of 315)

origin: apache/shiro

  @PreDestroy
  public void destroy() {
    ShiroModule.this.destroy();
  }
};
origin: apache/shiro

@Test
public void testDestroy() throws Exception {
  final MockRealm mockRealm = createMock(MockRealm.class);
  final MyDestroyable myDestroyable = createMock(MyDestroyable.class);
  myDestroyable.destroy();
  replay(myDestroyable);
  final ShiroModule shiroModule = new ShiroModule() {
    @Override
    protected void configureShiro() {
      bindRealm().to(MockRealm.class);
      bind(MyDestroyable.class).toInstance(myDestroyable);
      expose(MyDestroyable.class);
    }
    @Provides
    public MockRealm createRealm() {
      return mockRealm;
    }
  };
  Injector injector = Guice.createInjector(shiroModule);
  injector.getInstance(MyDestroyable.class);
  shiroModule.destroy();
  verify(myDestroyable);
}
origin: org.apache.shiro/shiro-guice

  @PreDestroy
  public void destroy() {
    ShiroModule.this.destroy();
  }
};
org.apache.shiro.guiceShiroModuledestroy

Javadoc

Destroys all beans created within this module that implement org.apache.shiro.util.Destroyable. Should be called when this module will no longer be used.

Popular methods of ShiroModule

  • bindSecurityManager
    Binds the security manager. Override this method in order to provide your own security manager bindi
  • add
  • bind
  • bindEnvironment
    Binds the environment. Override this method in order to provide your own environment binding. By def
  • bindEventBus
    Binds the EventBus. Override this method in order to provide your own EventBus binding.
  • bindListener
  • bindSessionManager
    Binds the session manager. Override this method in order to provide your own session manager binding
  • binder
  • configureShiro
    Implement this method in order to configure your realms and any other Shiro customization you may ne
  • expose
  • realmCollectionKey
  • realmSetKey
  • realmCollectionKey,
  • realmSetKey

Popular in Java

  • Reactive rest calls using spring rest template
  • setContentView (Activity)
  • putExtra (Intent)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • GridLayout (java.awt)
    The GridLayout class is a layout manager that lays out a container's components in a rectangular gri
  • File (java.io)
    An "abstract" representation of a file system entity identified by a pathname. The pathname may be a
  • Date (java.sql)
    A class which can consume and produce dates in SQL Date format. Dates are represented in SQL as yyyy
  • Arrays (java.util)
    This class contains various methods for manipulating arrays (such as sorting and searching). This cl
  • Response (javax.ws.rs.core)
    Defines the contract between a returned instance and the runtime when an application needs to provid
  • Options (org.apache.commons.cli)
    Main entry-point into the library. Options represents a collection of Option objects, which describ
  • Top Vim plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now