コード例 #1
0
 private HttpServerHandler([Parameter(Value = typeof(DriverBridgeConfigurationOptions.HttpEventHandlers))] ISet <IHttpHandler> httpEventHandlers,
                           HttpServerPort httpServerPort)
 {
     LOGGER.Log(Level.Info, "Constructing HttpServerHandler");
     foreach (var h in httpEventHandlers)
     {
         string spec = h.GetSpecification();
         if (spec.Contains(":"))
         {
             Exceptions.Throw(new ArgumentException("spec cannot contain :"), "The http spec given is " + spec, LOGGER);
         }
         LOGGER.Log(Level.Info, "HttpHandler spec:" + spec);
         eventHandlers.Add(spec.ToLower(CultureInfo.CurrentCulture), h);
     }
     this.httpServerPort = httpServerPort;
 }
コード例 #2
0
 public HelloStartHandler(HttpServerPort httpServerPort)
 {
     CreateClassHierarchy();
     Identifier = "HelloStartHandler";
     LOGGER.Log(Level.Info, "HttpPort received in HelloStartHandler: " + httpServerPort.PortNumber);
 }