Package com.sissi.protocol.iq.si

Examples of com.sissi.protocol.iq.si.Si.parent()


  }

  @Override
  public Map<String, Object> write(Element element) {
    Si si = Si.class.cast(element);
    Map<String, Object> entity = super.write(si.parent().reply().setType(ProtocolType.SET.toString()));
    entity.put(Dictionary.FIELD_SID, si.getId());
    entity.put(Dictionary.FIELD_SIZE, si.getFile().getSize());
    entity.put(Dictionary.FIELD_NAME, si.getFile().getName());
    entity.put(Dictionary.FIELD_CLASS, element.getClass().getSimpleName());
    entity.put(Dictionary.FIELD_HOST, new String[] { si.host(this.delegation, super.jidBuilder.build(si.parent().getTo()).asStringWithBare()) });
View Full Code Here


    Map<String, Object> entity = super.write(si.parent().reply().setType(ProtocolType.SET.toString()));
    entity.put(Dictionary.FIELD_SID, si.getId());
    entity.put(Dictionary.FIELD_SIZE, si.getFile().getSize());
    entity.put(Dictionary.FIELD_NAME, si.getFile().getName());
    entity.put(Dictionary.FIELD_CLASS, element.getClass().getSimpleName());
    entity.put(Dictionary.FIELD_HOST, new String[] { si.host(this.delegation, super.jidBuilder.build(si.parent().getTo()).asStringWithBare()) });
    if (si.delay()) {
      entity.put(Dictionary.FIELD_DELAY, si.getDelay().getStamp());
    }
    return entity;
  }
View Full Code Here

  }

  @Override
  public boolean input(JIDContext context, Protocol protocol) {
    Si si = protocol.cast(Si.class).setFeature(this.feature);
    this.exchangerContext.wait(si.host(context.jid().asString(this.resource), super.build(si.parent().getTo()).asString(this.resource)), true, this.transferBuilder.build(new SiTransferParam(si)));
    context.write(si.parent().reply().setType(ProtocolType.RESULT));
    return true;
  }

  private class SiTransferParam implements TransferParam {
View Full Code Here

  @Override
  public boolean input(JIDContext context, Protocol protocol) {
    Si si = protocol.cast(Si.class).setFeature(this.feature);
    this.exchangerContext.wait(si.host(context.jid().asString(this.resource), super.build(si.parent().getTo()).asString(this.resource)), true, this.transferBuilder.build(new SiTransferParam(si)));
    context.write(si.parent().reply().setType(ProtocolType.RESULT));
    return true;
  }

  private class SiTransferParam implements TransferParam {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.