Package com.sissi.protocol.offline

Examples of com.sissi.protocol.offline.Delay


   * @param message
   * @return
   */
  protected Delay delay(JID jid, Map<String, Object> element, Message message) {
    JID group = super.jidBuilder.build(element.get(Dictionary.FIELD_TO).toString());
    return new Delay(super.tip, this.room.build(group).allowed(jid, RoomConfig.WHOISALLOW, group) ? null : element.get(Dictionary.FIELD_SOURCE).toString(), element.get(Dictionary.FIELD_DELAY).toString());
  }
View Full Code Here


   * @param element
   * @param message
   * @return
   */
  protected Delay delay(Map<String, Object> element, Message message) {
    return new Delay(super.tip, message.getFrom(), element.get(Dictionary.FIELD_DELAY).toString());
  }
View Full Code Here

  private final FastDateFormat format = FastDateFormat.getInstance("yyyy-MM-dd'T'HH:mm:ssZ");
 
  @Override
  public boolean input(JIDContext context, Protocol protocol) {
    protocol.cast(Message.class).delay(new Delay().setStamp(this.format.format(new Date())));
    return true;
  }
View Full Code Here

  public String getXmlns() {
    return XMLNS;
  }

  public Si delay(String timestamp) {
    this.delay = timestamp != null ? new Delay().setStamp(timestamp) : null;
    return this;
  }
View Full Code Here

    XMuc x = protocol.cast(Presence.class).findField(XMuc.NAME, XMuc.class);
    if (x.hasHistory()) {
      JID group = super.build(protocol.getTo());
      Room room = this.room.build(group);
      for (Element message : this.recover.pull(group, x.history())) {
        Delay delay = Message.class.cast(message).getDelay();
        delay.setFrom(room.allowed(context.jid(), RoomConfig.WHOISALLOW, super.build(delay.getFrom())) ? super.build(message.getFrom()).asStringWithBare() : delay.getFrom());
        context.write(message);
      }
  }
    return true;
  }
View Full Code Here

TOP

Related Classes of com.sissi.protocol.offline.Delay

Copyright © 2018 www.massapicom. 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.