public DynamicRouteResolverAdapter(final DynamicRouteResolver dynamicRouteResolver) { this(dynamicRouteResolver, UUID.getUUID()); }
public static String concatId(String string) { return string + "#" + UUID.getUUID(); }
public static String getUniqueId() { return UUID.getUUID(); }
private File getNewPartitionDirectory() { return new File(storeDirectory, UUID.getUUID()); }
private String createMultipartFormDataContentType() { return String.format("%s; boundary=%s", HttpHeaders.Values.MULTIPART_FORM_DATA, UUID.getUUID()); }
public DefaultMuleSession() { id = UUID.getUUID(); properties = Collections.synchronizedMap(new CaseInsensitiveHashMap()); }
private void registerUnnamedObjects(Properties props) throws Exception { for (Map.Entry<Object, Object> entry : props.entrySet()) { final String key = String.format("%s#%s", entry.getKey(), UUID.getUUID()); registerObject(key, (String) entry.getValue()); } props.clear(); }
@Override public String getUniqueIdString() { return clusterConfiguration.getClusterNodeId() + "-" + UUID.getUUID(); }
public XmppMultiUserChatConversation(ImmutableEndpoint endpoint) { super(endpoint); connector = endpoint.getConnector(); Object nickValue = endpoint.getProperty(XmppConnector.XMPP_NICKNAME); if (nickValue != null) { nickname = nickValue.toString(); } else { nickname = UUID.getUUID(); } }
protected File createFileToStoreObject() throws ObjectStoreException { String filename = org.mule.util.UUID.getUUID() + OBJECT_FILE_EXTENSION; try { return newFile(partitionDirectory, filename); } catch (MuleRuntimeException mre) { throw new ObjectStoreException(mre); } }
public void initialise() throws InitialisationException { if (name == null) { name = UUID.getUUID(); } if (expirationInterval <= 0) { throw new IllegalArgumentException(CoreMessages.propertyHasInvalidValue("expirationInterval", new Integer(expirationInterval)).toString()); } if (scheduler == null) { this.scheduler = new ScheduledThreadPoolExecutor(1); scheduler.setThreadFactory(new DaemonThreadFactory(name + "-Monitor", this.getClass().getClassLoader())); scheduler.scheduleWithFixedDelay(this, 0, expirationInterval, TimeUnit.MILLISECONDS); } }
@Override public void initialise() throws InitialisationException { if (name == null) { name = UUID.getUUID(); } if (expirationInterval <= 0) { throw new IllegalArgumentException(CoreMessages.propertyHasInvalidValue("expirationInterval", new Integer(expirationInterval)).toString()); } if (scheduler == null) { this.scheduler = new ScheduledThreadPoolExecutor(1); scheduler.setThreadFactory(new DaemonThreadFactory(name + "-Monitor", context.getExecutionClassLoader())); scheduler.scheduleWithFixedDelay(this, 0, expirationInterval, TimeUnit.MILLISECONDS); } }
/** * Returns the name for the object passed in. If the object implements {@link org.mule.api.NameableObject}, then * {@link org.mule.api.NameableObject#getName()} will be returned, otherwise a name is generated using the class name * and a generated UUID. * * @param obj the object to inspect * @return the name for this object */ protected String getName(Object obj) { String name = null; if (obj instanceof NameableObject) { name = ((NameableObject) obj).getName(); } else if (obj instanceof FlowConstruct) { name = ((FlowConstruct) obj).getName(); } if (StringUtils.isBlank(name)) { name = obj.getClass().getName() + ":" + UUID.getUUID(); } return name; }
public DefaultMuleConfiguration(boolean containerMode) { this.containerMode = containerMode; // Apply any settings which come from the JVM system properties. applySystemProperties(); if (id == null) { id = UUID.getUUID(); } if (domainId == null) { try { domainId = NetworkUtils.getLocalHost().getHostName(); } catch (UnknownHostException e) { logger.warn(e); domainId = "org.mule"; } } try { validateEncoding(); } catch (FatalException e) { throw new RuntimeException(e); } }
private synchronized void checkPipelineId(String id) throws DynamicPipelineException { if (pipelineId != null) { if(!StringUtils.equals(pipelineId, id)) { throw new DynamicPipelineException(CoreMessages.createStaticMessage("Invalid Dynamic Pipeline ID")); } } else { pipelineId = (id != null) ? id : UUID.getUUID(); } }
return UUID.getUUID();
protected Serializable doStore(QueueInfo queue, Serializable object) throws ObjectStoreException { ObjectStore<Serializable> store = queue.getStore(); String id = muleContext == null ? UUID.getUUID() : muleContext.getUniqueIdString(); Serializable key = new QueueKey(queue.getName(), id); store.store(key, object); return id; }
protected AnnotatedEndpointData createEndpointData(Annotation annotation) throws MuleException { //This will only get called if there is no config builder configured Schedule schedule = (Schedule) annotation; String uri = "quartz://schedule" + UUID.getUUID(); AnnotatedEndpointData epData = new AnnotatedEndpointData(MessageExchangePattern.ONE_WAY, ChannelType.Inbound, annotation); epData.setProperties(convertProperties(getProperties(schedule))); //By default the scheduler should only use a single thread //TODO configure threads String threads = (String) epData.getProperties().get("threads"); if (threads == null) { threads = "1"; epData.getProperties().put("threads", threads); } epData.setAddress(uri); epData.setConnector(getConnector()); //Create event generator job EventGeneratorJobConfig config = new EventGeneratorJobConfig(); config.setStateful(threads.equals("1")); epData.getProperties().put(QuartzConnector.PROPERTY_JOB_CONFIG, config); return epData; }
id = UUID.getUUID();
public DefaultMuleMessage(Object message, Map<String, Object> inboundProperties, Map<String, Object> outboundProperties, Map<String, DataHandler> attachments, MuleContext muleContext, DataType dataType) { id = UUID.getUUID(); rootId = id; setMuleContext(muleContext); if (message instanceof MuleMessage) { MuleMessage muleMessage = (MuleMessage) message; setPayload(muleMessage.getPayload(), dataType); copyMessageProperties(muleMessage); } else { setPayload(message, dataType); originalPayload = message; } addProperties(inboundProperties, PropertyScope.INBOUND); addProperties(outboundProperties); //Add inbound attachments if (attachments != null) { inboundAttachments = attachments; } resetAccessControl(); }