class EventProcessor implements RemoteEventListener {

    public void start(final StartCallback callback) {
        remoteEventService.addListener(domain, this, new AsyncCallback<Void>() {
            @Override
            public void onSuccess(Void result) {
                Log.info("EventProcessor is now listening for events in the domain "
                        + domain.getName());
                String connectionId =
                        eventServiceConfiguration().getConnectionId();
                callback.onSuccess(connectionId);
            }

            @Override
            public void onFailure(Throwable e) {
                Log.error("Failed to start EventProcessor", e);
                callback.onFailure(e);
            }
        });
    }

    @Inject public  EventProcessor(EventBus eventBus,
            UserWorkspaceContext userWorkspaceContext,
            RemoteEventService remoteEventService);

}