You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

LifeCycleListener.java 1.3KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. /*
  2. * Copyright 2014 gitblit.com.
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License");
  5. * you may not use this file except in compliance with the License.
  6. * You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. */
  16. package com.gitblit.extensions;
  17. import ro.fortsoft.pf4j.ExtensionPoint;
  18. /**
  19. * Extension point to allow plugins to listen to major Gitblit lifecycle events.
  20. *
  21. * @author James Moger
  22. * @since 1.6.0
  23. */
  24. public abstract class LifeCycleListener implements ExtensionPoint {
  25. /**
  26. * Called after all internal managers have been started.
  27. * This may be useful for reporting "server is ready" to a monitoring system.
  28. *
  29. * @since 1.6.0
  30. */
  31. public abstract void onStartup();
  32. /**
  33. * Called when the servlet container is gracefully shutting-down the webapp.
  34. * This is called before the internal managers are stopped.
  35. *
  36. * @since 1.6.0
  37. */
  38. public abstract void onShutdown();
  39. }