예제 #1
0
  public MessageAwaiterImpl(AgentItem agent, String canvasId, Phase phase) {
    this.agent = agent;
    this.canvasId = canvasId;
    this.phase = phase;

    agent.addMessageListener(CHANNEL, this);
    agent.addConnectionListener(this);
    agent.sendMessage(CHANNEL, new Object[] {canvasId, phase.toString()});
  }
예제 #2
0
  @Override
  public void release() {
    fireBaseEvent(RELEASED);

    testRunner.unregisterTask(executionTask, Phase.values());
    ReleasableUtils.releaseAll(componentList, connectionList);
    summary = null;

    ReleasableUtils.releaseAll(counterStatisticSupport, statisticHolderSupport);

    super.release();
  }
예제 #3
0
 @Override
 public void handleMessage(String channel, MessageEndpoint endpoint, Object data) {
   if (CHANNEL.equals(channel)) {
     Object[] strings = (Object[]) data;
     if (canvasId.equals(strings[0]) && phase == Phase.valueOf((String) strings[1])) {
       if (Boolean.parseBoolean((String) strings[2])) {
         complete();
       } else {
         synchronized (this) {
           deadline = System.currentTimeMillis() + TIMEOUT;
         }
       }
     }
   }
 }