/** * Factory method to create a new component ID if none is specified * * @return uniqueId */ protected String createComponentID() { return idGenerator.generateId(); }
protected String getExchangeId() { return idGenerator.generateId(); }
/** * Generate a unique ID - that is friendly for a URL or file system * * @return a unique id */ public String generateSanitizedId() { String result = generateId(); result = result.replace(':', '-'); result = result.replace('_', '-'); result = result.replace('.', '-'); return result; }
public String store(Object data) throws IOException { String id = idGenerator.generateId(); store(id, data); return id; }
public String store(Object data) throws IOException { String id = factory.getIdGenerator().generateId(); store(id, data); return id; }
public CamelConsumerEndpoint(JbiBinding binding, JbiEndpoint jbiEndpoint) { setService(SERVICE_NAME); setEndpoint(new IdGenerator().generateId()); this.binding = binding; this.jbiEndpoint = jbiEndpoint; }
public void resendExchange(MessageExchange exchange) throws JBIException { if (!(exchange instanceof MessageExchangeImpl)) { throw new IllegalArgumentException("exchange should be a MessageExchangeImpl"); } MessageExchangeImpl me = (MessageExchangeImpl) exchange; me.getPacket().setExchangeId(new IdGenerator().generateId()); me.getPacket().setOut(null); me.getPacket().setFault(null); me.getPacket().setError(null); me.getPacket().setStatus(ExchangeStatus.ACTIVE); me.getPacket().setProperty(JbiConstants.DATESTAMP_PROPERTY_NAME, Calendar.getInstance()); ExchangeListener[] l = (ExchangeListener[]) listeners.getListeners(ExchangeListener.class); ExchangeEvent event = new ExchangeEvent(me, ExchangeEvent.EXCHANGE_SENT); for (int i = 0; i < l.length; i++) { try { l[i].exchangeSent(event); } catch (Exception e) { LOGGER.warn("Error calling listener: {}", e.getMessage(), e); } } me.handleSend(false); sendExchange(me.getMirror()); }