Code example for EventBus

Methods: post

0
		final xcb_circulate_notify_event_t circulate_notify_event = cast(event_t);
		// TODO logging 
		LOG.debug(	"Received X event={}", 
					circulate_notify_event.getClass().getSimpleName());
 
		this.xEventBus.post(circulate_notify_event);
 
		return Optional.of(new StackingChangedNotify());
	} 
 
	private xcb_circulate_notify_event_t cast(final xcb_generic_event_t event_t) {
		return new xcb_circulate_notify_event_t(xcb_generic_event_t.getCPtr(event_t),
												false); 
	} 
 
	@Override 
	public Optional<DisplaySurface> getTarget(final xcb_generic_event_t event_t) {
		final xcb_circulate_notify_event_t circulate_notify_event_t = cast(event_t);
		final int windowId = circulate_notify_event_t.getWindow();
		return Optional.of(this.xWindowCache.getWindow(windowId));
Experience pair programming with AI  Get Codota for Java