class TestComponent implements Distributable
{
public void start()
{
Thread thread = new Thread(this);
thread.start();
}
public void doSomething()
{
mesh.eventing().sendEvent(new MeshEvent("SUCCESS");
}
}
public void test() throws Exception
{
MeshKeeper mesh = getMeshKeeper();
MeshContainer m = mesh.createMeshContainer("agent1", .... );
TestComponent component1 = m.host(new TestComponent());
TestComponent component2 = m.host(new TestComponent());
component1.start();
component2.start();
waitForFinishedEvents();
}