protected OMElement serializeSpecificMediator(Mediator m) {
assert m instanceof EnqueueMediator :
"Unsupported mediator passed in for serialization : " + m.getType();
EnqueueMediator mediator = (EnqueueMediator) m;
OMElement enqueue = fac.createOMElement("enqueue", synNS);
saveTracingState(enqueue, mediator);
if (mediator.getExecutorName() != null) {
enqueue.addAttribute(fac.createOMAttribute(
"executor", nullNS, mediator.getExecutorName()));
} else {
handleException("Invalid enqueue mediator. queue is required");
}
if (mediator.getSequenceName() != null) {
enqueue.addAttribute(fac.createOMAttribute(
"sequence", nullNS, mediator.getSequenceName()));
} else {
handleException("Invalid enqueue mediator. sequence is required");
}
enqueue.addAttribute(fac.createOMAttribute(
"priority", nullNS, mediator.getPriority() + ""));
return enqueue;
}