Package ome.services.blitz.util
Class BlitzConfiguration
- java.lang.Object
-
- ome.services.blitz.util.BlitzConfiguration
-
public class BlitzConfiguration extends java.lang.Object
Factory bean which creates anCommunicator
instance as well as the properObjectAdapter
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)
LikeBlitzConfiguration(Ring, ome.services.sessions.SessionManager, SessionProvider, SecuritySystem, Executor, int)
but allows properties to be specified via anInitializationData
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 andcommunicator
is 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 theCommunicator
instance. 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.RuntimeException
LikeBlitzConfiguration(Ring, ome.services.sessions.SessionManager, SessionProvider, SecuritySystem, Executor, int)
but allows properties to be specified via anInitializationData
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 andcommunicator
is 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.
-
-