Package ome.services.blitz.util
Class BlitzConfiguration
- java.lang.Object
-
- ome.services.blitz.util.BlitzConfiguration
-
public class BlitzConfiguration extends java.lang.ObjectFactory bean which creates anCommunicatorinstance as well as the properObjectAdapterand 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)LikeBlitzConfiguration(Ring, ome.services.sessions.SessionManager, SessionProvider, SecuritySystem, Executor, int)but allows properties to be specified via anInitializationDatainstance.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.ObjectAdaptercreateAdapter()Creates an adapter with the name "BlitzAdapter", which must be properly configured via --Ice.Config or ICE_CONFIG or similar.protected SessionManagerIcreateAndRegisterManager(ome.services.sessions.SessionManager sessionManager, ome.security.SecuritySystem securitySystem, ome.services.util.Executor executor)protected Glacier2.PermissionsVerifiercreateAndRegisterVerifier(ome.services.sessions.SessionManager sessionManager, ome.services.sessions.SessionProvider sessionProvider, ome.services.util.Executor executor)protected Ice.CommunicatorcreateCommunicator()protected Ice.CommunicatorcreateCommunicator(java.lang.String configFile, java.lang.String[] arguments)voiddestroy()Ice.ObjectAdaptergetBlitzAdapter()Glacier2.SessionManagergetBlitzManager()Glacier2.PermissionsVerifiergetBlitzVerifier()Ice.CommunicatorgetCommunicator()Ice.ObjectPrxgetDirectProxy()Return a direct proxy to the session manager in this object adapter.RegistrygetRegistry()RinggetRing()TopicManagergetTopicManager()protected java.lang.StringresolveConfigFile(java.lang.String configFile)Resolve the given config file to a concrete location, possibly throwing an exception if stored in a jar.protected voidthrowIfInitialized(java.lang.Object instance)If this configuration is finished andcommunicatoris not-null, throw aIllegalStateException
-
-
-
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, sincethrowIfInitialized(Object)is called first. If any of the methods other thancreateCommunicator()throws an exception, thendestroy()will be called to properly shut down theCommunicatorinstance. Thereforedestroy()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.RuntimeExceptionLikeBlitzConfiguration(Ring, ome.services.sessions.SessionManager, SessionProvider, SecuritySystem, Executor, int)but allows properties to be specified via anInitializationDatainstance.- 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 andcommunicatoris not-null, throw aIllegalStateException
-
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()
-
getTopicManager
public TopicManager getTopicManager()
-
getDirectProxy
public Ice.ObjectPrx getDirectProxy()
Return a direct proxy to the session manager in this object adapter.
-
-