Exemplo n.º 1
0
  public String toXML() {
    StringBuilder xml = new StringBuilder("<allocate ");
    xml.append("initiator=\"").append(getInitiatorString()).append("\">");

    if (isSystemInitiated()) if (_allocator != null) xml.append(_allocator.toXML());
    xml.append("</allocate>");
    return xml.toString();
  }
Exemplo n.º 2
0
  public void parse(Element e, Namespace nsYawl) throws ResourceParseException {
    parseInitiator(e, nsYawl);

    Element eAllocator = e.getChild("allocator", nsYawl);
    if (eAllocator != null) {
      String allocatorClassName = eAllocator.getChildText("name", nsYawl);
      if (allocatorClassName != null) {
        _allocator = AllocatorFactory.getInstance(allocatorClassName);
        if (_allocator != null) _allocator.setParams(parseParams(eAllocator, nsYawl));
        else throw new ResourceParseException("Unknown allocator name: " + allocatorClassName);
      } else throw new ResourceParseException("Missing allocator element: name");
    }
  }
Exemplo n.º 3
0
 public Participant performAllocation(Set offerSet, WorkItemRecord wir) {
   return _allocator.performAllocation(offerSet, wir);
 }