static void Main(string[] args) { XmlConfigurator.Configure(); var eventingServer = new EventingServer(new RequestHandler()); var pullServer = new PullServer(); eventingServer.EnablePullDeliveryUsing(pullServer); eventingServer.Bind(FilterMap.DefaultDialect, typeof(JmxNotificationFilter)); Console.WriteLine("WARNING! TimedOut exception which will cause your Visual Studio to break into"); Console.WriteLine("debugging mode are part of WS-Eventing protocol and should be skipped"); Console.WriteLine("with F5 while debugging."); Console.WriteLine(); var client = new EventingClient("http://localhost:12345/Eventing"); client.BindFilterDialect(FilterMap.DefaultDialect, typeof(JmxNotificationFilter)); using (new HttpListenerTransferEndpoint("http://localhost:12345/",eventingServer, pullServer)) { using (client.SubscribeUsingPullDelivery<EventData>( x => Console.WriteLine(x.Value), true, new Filter(FilterMap.DefaultDialect, new JmxNotificationFilter()))) { Console.WriteLine("Press any key to exit."); Console.ReadKey(); } } }
static void Main(string[] args) { XmlConfigurator.Configure(); var eventingServer = new EventingServer(new RequestHandler()); var pullServer = new PullServer(); eventingServer.EnablePullDeliveryUsing(pullServer); eventingServer.Bind(FilterMap.DefaultDialect, typeof(JmxNotificationFilter)); Console.WriteLine("WARNING! TimedOut exception which will cause your Visual Studio to break into"); Console.WriteLine("debugging mode are part of WS-Eventing protocol and should be skipped"); Console.WriteLine("with F5 while debugging."); Console.WriteLine(); var client = new EventingClient("http://localhost:12345/Eventing"); client.BindFilterDialect(FilterMap.DefaultDialect, typeof(JmxNotificationFilter)); using (new HttpListenerTransferEndpoint("http://localhost:12345/", eventingServer, pullServer)) { using (client.SubscribeUsingPullDelivery <EventData>( x => Console.WriteLine(x.Value), true, new Filter(FilterMap.DefaultDialect, new JmxNotificationFilter()))) { Console.WriteLine("Press any key to exit."); Console.ReadKey(); } } }
public Jsr262MBeanServerConnection(int enumerationMaxElements, string serverUri) { _enumerationMaxElements = enumerationMaxElements; _soapClient = new SOAPClient(serverUri); _manClient = new ManagementClient(serverUri); _enumClient = new EnumerationClient(true, serverUri); _eventingClient = new EventingClient(serverUri); }