1 /* 2 * Copyright (c) MuleSoft, Inc. All rights reserved. http://www.mulesoft.com 3 * The software in this package is published under the terms of the CPAL v1.0 4 * license, a copy of which has been included with this distribution in the 5 * LICENSE.txt file. 6 */ 7 package org.mule.tck.services; 8 9 import org.mule.api.MuleEventContext; 10 import org.mule.api.lifecycle.Callable; 11 import org.mule.util.UUID; 12 13 /** 14 * Each instance of this service should contain a unique ID. 15 * Useful for testing object pools. 16 */ 17 public class UniqueComponent implements Callable 18 { 19 String id = UUID.getUUID(); 20 21 public Object onCall(MuleEventContext eventContext) throws Exception 22 { 23 return getId(); 24 } 25 26 public String getId() 27 { 28 return id; 29 } 30 31 public void setId(String id) 32 { 33 this.id = id; 34 } 35 } 36 37