Class BlitzConfiguration


  • public class BlitzConfiguration
    extends java.lang.Object
    Factory bean which creates an Communicator instance as well as the proper ObjectAdapter and adds initial, well-known servants.
    Since:
    3.0-Beta3.1
    • Constructor Summary

      Constructors 
      Constructor Description
      BlitzConfiguration​(Ice.InitializationData id, Ring ring, ome.services.sessions.SessionManager sessionManager, ome.services.sessions.SessionProvider sessionProvider, ome.security.SecuritySystem securitySystem, ome.services.util.Executor executor, int servantsPerSession)
      Like BlitzConfiguration(Ring, ome.services.sessions.SessionManager, SessionProvider, SecuritySystem, Executor, int) but allows properties to be specified via an InitializationData instance.
      BlitzConfiguration​(Ring ring, ome.services.sessions.SessionManager sessionManager, ome.services.sessions.SessionProvider sessionProvider, ome.security.SecuritySystem securitySystem, ome.services.util.Executor executor, int servantsPerSession)
      Single constructor which builds all Ice instances needed for the server runtime based on arguments provided.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected Ice.ObjectAdapter createAdapter()
      Creates an adapter with the name "BlitzAdapter", which must be properly configured via --Ice.Config or ICE_CONFIG or similar.
      protected SessionManagerI createAndRegisterManager​(ome.services.sessions.SessionManager sessionManager, ome.security.SecuritySystem securitySystem, ome.services.util.Executor executor)  
      protected Glacier2.PermissionsVerifier createAndRegisterVerifier​(ome.services.sessions.SessionManager sessionManager, ome.services.sessions.SessionProvider sessionProvider, ome.services.util.Executor executor)  
      protected Ice.Communicator createCommunicator()  
      protected Ice.Communicator createCommunicator​(java.lang.String configFile, java.lang.String[] arguments)  
      void destroy()  
      Ice.ObjectAdapter getBlitzAdapter()  
      Glacier2.SessionManager getBlitzManager()  
      Glacier2.PermissionsVerifier getBlitzVerifier()  
      Ice.Communicator getCommunicator()  
      Ice.ObjectPrx getDirectProxy()
      Return a direct proxy to the session manager in this object adapter.
      Registry getRegistry()  
      Ring getRing()  
      TopicManager getTopicManager()  
      protected java.lang.String resolveConfigFile​(java.lang.String configFile)
      Resolve the given config file to a concrete location, possibly throwing an exception if stored in a jar.
      protected void throwIfInitialized​(java.lang.Object instance)
      If this configuration is finished and communicator is not-null, throw a IllegalStateException
      • Methods inherited from class java.lang.Object

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

      • BlitzConfiguration

        public BlitzConfiguration​(Ring ring,
                                  ome.services.sessions.SessionManager sessionManager,
                                  ome.services.sessions.SessionProvider sessionProvider,
                                  ome.security.SecuritySystem securitySystem,
                                  ome.services.util.Executor executor,
                                  int servantsPerSession)
                           throws java.lang.RuntimeException
        Single constructor which builds all Ice instances needed for the server runtime based on arguments provided. Once the constructor is finished, none of the default create* methods can safely be called, since throwIfInitialized(Object) is called first. If any of the methods other than createCommunicator() throws an exception, then destroy() will be called to properly shut down the Communicator instance. Therefore destroy() should be careful to check for nulls.
        Throws:
        java.lang.RuntimeException
      • BlitzConfiguration

        public BlitzConfiguration​(Ice.InitializationData id,
                                  Ring ring,
                                  ome.services.sessions.SessionManager sessionManager,
                                  ome.services.sessions.SessionProvider sessionProvider,
                                  ome.security.SecuritySystem securitySystem,
                                  ome.services.util.Executor executor,
                                  int servantsPerSession)
                           throws java.lang.RuntimeException
        Like BlitzConfiguration(Ring, ome.services.sessions.SessionManager, SessionProvider, SecuritySystem, Executor, int) but allows properties to be specified via an InitializationData instance.
        Parameters:
        id -
        ring -
        sessionManager -
        securitySystem -
        executor -
        servantsPerSession -
        Throws:
        java.lang.RuntimeException
    • Method Detail

      • throwIfInitialized

        protected final void throwIfInitialized​(java.lang.Object instance)
        If this configuration is finished and communicator is not-null, throw a IllegalStateException
      • createCommunicator

        protected Ice.Communicator createCommunicator()
      • createCommunicator

        protected Ice.Communicator createCommunicator​(java.lang.String configFile,
                                                      java.lang.String[] arguments)
      • resolveConfigFile

        protected java.lang.String resolveConfigFile​(java.lang.String configFile)
        Resolve the given config file to a concrete location, possibly throwing an exception if stored in a jar. Null will not be returned, but an exception may be thrown if the path is invalid.
      • createAdapter

        protected Ice.ObjectAdapter createAdapter()
        Creates an adapter with the name "BlitzAdapter", which must be properly configured via --Ice.Config or ICE_CONFIG or similar.
      • createAndRegisterManager

        protected SessionManagerI createAndRegisterManager​(ome.services.sessions.SessionManager sessionManager,
                                                           ome.security.SecuritySystem securitySystem,
                                                           ome.services.util.Executor executor)
      • createAndRegisterVerifier

        protected Glacier2.PermissionsVerifier createAndRegisterVerifier​(ome.services.sessions.SessionManager sessionManager,
                                                                         ome.services.sessions.SessionProvider sessionProvider,
                                                                         ome.services.util.Executor executor)
      • destroy

        public void destroy()
      • getRing

        public Ring getRing()
      • getCommunicator

        public Ice.Communicator getCommunicator()
      • getBlitzAdapter

        public Ice.ObjectAdapter getBlitzAdapter()
      • getBlitzManager

        public Glacier2.SessionManager getBlitzManager()
      • getBlitzVerifier

        public Glacier2.PermissionsVerifier getBlitzVerifier()
      • getRegistry

        public Registry getRegistry()
      • getDirectProxy

        public Ice.ObjectPrx getDirectProxy()
        Return a direct proxy to the session manager in this object adapter.