/// ----------------------------------------------------------------- /// <summary> /// </summary> /// ----------------------------------------------------------------- public EndPointHandlers(IConfig config, DispatcherModule dispatcher) { m_dispatcher = dispatcher; m_dispatcher.RegisterOperationHandler(m_dispatcher.Domain, typeof(CreateEndPointRequest), CreateEndPointRequestHandler); m_dispatcher.RegisterOperationHandler(m_dispatcher.Domain, typeof(RenewEndPointRequest), RenewEndPointRequestHandler); m_dispatcher.RegisterOperationHandler(m_dispatcher.Domain, typeof(CloseEndPointRequest), CloseEndPointRequestHandler); m_dispatcher.RegisterMessageType(typeof(CreateEndPointResponse)); }
/// ----------------------------------------------------------------- /// <summary> /// </summary> /// ----------------------------------------------------------------- public AuthHandlers(IConfig config, DispatcherModule dispatcher) { m_dispatcher = dispatcher; m_maxLifeSpan = config.GetInt("MaxLifeSpan", m_maxLifeSpan); // these flags set the default behavior for authentication, the settings specified // turn ON authentication and grants access to estate managers only m_useAuthentication = config.GetBoolean("UseAuthentication", m_useAuthentication); m_grantEstateManagerAccess = config.GetBoolean("GrantEstateManagersAccess", true); m_grantGridManagerAccess = config.GetBoolean("GrantGridManagersAccess", false); m_gridManagerAccessLimit = config.GetInt("GridManagerAccessLevel", 256); m_dispatcher.RegisterPreOperationHandler(typeof(CreateCapabilityRequest), CreateCapabilityRequestHandler); m_dispatcher.RegisterOperationHandler(m_dispatcher.Domain, typeof(RenewCapabilityRequest), RenewCapabilityRequestHandler); m_dispatcher.RegisterOperationHandler(m_dispatcher.Domain, typeof(DestroyCapabilityRequest), DestroyCapabilityRequestHandler); m_dispatcher.RegisterMessageType(typeof(CapabilityResponse)); m_console = MainConsole.Instance; m_console.Commands.AddCommand("Dispatcher", false, "dispatcher show capabilities", "dispatcher show capabilities", "Dump the capabilities table", "", HandleShowCapabilities); }