Object PulsarContexts

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      final static PulsarContext create() Create a new context, if there is already an active context, return it.
      final static PulsarContext create(PulsarContext context) Create a new context, if there is already an active context, return it.
      final static PulsarContext create(String contextLocation) Create a new context, if there is already an active context, return it.
      final static PulsarContext create(ApplicationContext applicationContext) Create a new context, if there is already an active context, return it.
      final static PulsarSession createSession() Create a PulsarSession with the active context.
      final static PulsarSession getOrCreateSession() Create a PulsarSession with the active context.
      final static Unit await() Wait for all submitted urls to be processed.
      final static Unit registerClosable(AutoCloseable closable, Integer priority) Register a closable object to the active context.
      final static Unit shutdown() Close the all the created context.
      final PulsarContext getActiveContext() The active context, it's the last created context.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • Method Detail

      • create

        @Synchronized() final static PulsarContext create()

        Create a new context, if there is already an active context, return it.

        Returns:

        the created context

      • create

        @Synchronized() final static PulsarContext create(PulsarContext context)

        Create a new context, if there is already an active context, return it.

        Parameters:
        context - the context to be created
        Returns:

        the created context

      • create

        @Synchronized() final static PulsarContext create(String contextLocation)

        Create a new context, if there is already an active context, return it.

        Parameters:
        contextLocation - the location of the context
        Returns:

        the created context

      • create

        @Synchronized() final static PulsarContext create(ApplicationContext applicationContext)

        Create a new context, if there is already an active context, return it.

        Parameters:
        applicationContext - the Spring application context
        Returns:

        the created context

      • await

         final static Unit await()

        Wait for all submitted urls to be processed.

      • registerClosable

         final static Unit registerClosable(AutoCloseable closable, Integer priority)

        Register a closable object to the active context. TODO: might fail before the context is created

        Parameters:
        closable - the closable object
        priority - the priority of the closable object