private boolean handlePingWithArgsMessage(boolean outbound, T ctx) {
LogicalMessage msg = ctx.getMessage();
Object payload = msg.getPayload(jaxbCtx);
addHandlerId(ctx.getMessage(), ctx, outbound);
boolean ret = true;
if (payload instanceof PingWithArgs) {
String arg = ((PingWithArgs)payload).getHandlersCommand();
StringTokenizer strtok = new StringTokenizer(arg, " ");
String hid = strtok.nextToken();
String direction = strtok.nextToken();
String command = strtok.nextToken();
if (outbound) {
return ret;
}
if (getHandlerId().equals(hid)
&& "inbound".equals(direction)) {
if ("stop".equals(command)) {
PingResponse resp = new PingResponse();
getHandlerInfoList(ctx).add(getHandlerId());
resp.getHandlersInfo().addAll(getHandlerInfoList(ctx));
msg.setPayload(resp, jaxbCtx);
ret = false;
} else if ("throw".equals(command)) {
throwException(strtok.nextToken());
}
}