code: public int subscribe_event(final DeviceProxy deviceProxy,
  	            final int event, final CallBack callback, final boolean stateless) throws DevFailed {
          int id = 0;
          try {
              id = EventConsumerUtil.getInstance().subscribe_event(
                      deviceProxy, event, callback, -1, stateless);
          } catch (final DevFailed e) {
              throw e;
          } catch (final Exception e) {
              e.printStackTrace();
              Except.throw_communication_failed(e.toString(), "Subscribe event on "
                  + name(deviceProxy) + "/" + deviceProxy.devname + " Failed !",
                  "DeviceProxy.subscribe_event()");
          }
          return id;
      }
docs: ==========================================================================