/** * Constructor. * * @param gateway * The <code>Gateway</code> on behalf of whom this dispatcher * dispatches events. */ protected GatewayEventProcessor(GatewayImpl gateway) { super(LogWriterImpl.createThreadGroup("Gateway Event Processor from " + gateway.getGatewayHubId() + " to " + gateway.getId(), gateway .getLogger()), "Gateway Event Processor from " + gateway.getGatewayHubId() + " to " + gateway.getId()); this._gateway = gateway; this.unprocessedEvents = new LinkedHashMap(); this.unprocessedTokens = new LinkedHashMap(); // Create the event conflator //this._eventConflator = new BridgeEventConflator(this._logger); this._eventQueue = this.initializeMessageQueue(); this._eventDispatcher = this.initializeEventDispatcher(); setDaemon(true); }
@Override public String toString() { StringBuffer buffer = new StringBuffer(); GatewayQueueAttributes gqa = getGateway().getQueueAttributesNoSync(); buffer .append("GatewayEventProcessor[") .append("gatewayId=") .append(getGateway().getId()) .append(";gatewayHubId=") .append(getGateway().getGatewayHubId()); if (gqa.getDiskStoreName()!=null) { buffer.append(";diskStoreName=") .append(gqa.getDiskStoreName()); } else { buffer.append(";overflowDirectory=") .append(gqa.getOverflowDirectory()); } buffer .append(";batchSize=") .append(gqa.getBatchSize()) .append(";batchTimeInterval=") .append(gqa.getBatchTimeInterval()) .append(";batchConflation=") .append(gqa.getBatchConflation()) .append(";enablePersistence=") .append(gqa.getEnablePersistence()) .append("]"); return buffer.toString(); }
getGatewayHubId(), getId(), gpi == null ? null : gpi.getStatistics()));
.append(getGateway().getGatewayHubId()) .append('_') .append(getGateway().getId())
if (geca.getOriginatingGatewayHubId() == null) { geca .setOriginatingGatewayHubId(getGateway().getGatewayHubId()); geca.initializeRecipientGateways(getGateway().getGatewayHub() .getGatewayIds());
new Object[] {GatewayImpl.this, GatewayImpl.this.getGatewayHubId(), gatewayEvent});