code: private Event linkChainIdentifier(Event event) {
          if (event instanceof ChainableEvent) {
              ChainableEvent chainableEvent = (ChainableEvent)event;
              chainableEvent.setChainIdentifier(this.getChainIdentifier());
              return chainableEvent;
          }
          return event;
      }
docs: Assigns the chain identifier for the specified event to the chain identifier
  value of this instance. This requires the specified event to be an instance
  of ChainableEvent.
  @param event the event to chain
  @return a chained event