public AbstractMessage( String id, String clientId, long timestamp, long timeToLive, Map<String, Object> headers) { setId(id); this.clientId = clientId; this.timestamp = timestamp; this.timeToLive = timeToLive; this.headers = headers; }
protected void copy(AbstractResponseMessage message, String correlationId) { super.copy(message); message.correlationId = correlationId; }
@Override public boolean isExpired(long currentTimeMillis) { return getRemainingTimeToLive(currentTimeMillis) < 0; }
@Override public Message copy() { TopicMessage message = new TopicMessage(); super.copy(message); return message; }
public String getId() { return request.getId(); }
@Override public ResponseMessage next() { if (current == null) throw new NoSuchElementException(); ResponseMessage c = current; current = current.getNext(); return c; }
@Override public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException { super.readExternal(in); this.correlationId = in.readUTF(); }
@Override public Message clone() throws CloneNotSupportedException { return copy(); }
public String getId() { return request.getId(); }
public AbstractMessage( String id, String clientId, long timestamp, long timeToLive, Map<String, Object> headers) { setId(id); this.clientId = clientId; this.timestamp = timestamp; this.timeToLive = timeToLive; this.headers = headers; }
@Override public boolean isExpired(long currentTimeMillis) { return getRemainingTimeToLive(currentTimeMillis) < 0; }
@Override public void setNext(ResponseMessage next) { for (ResponseMessage n = next; n != null; n = n.getNext()) { if (n == this) throw new RuntimeException("Circular chaining to this: " + next); } this.next = next; }
@Override public Message clone() throws CloneNotSupportedException { return copy(); }
public String getId() { return request.getId(); }
public AbstractMessage( String id, String clientId, long timestamp, long timeToLive, Map<String, Object> headers) { setId(id); this.clientId = clientId; this.timestamp = timestamp; this.timeToLive = timeToLive; this.headers = headers; }
@Override public boolean isExpired(long currentTimeMillis) { return getRemainingTimeToLive(currentTimeMillis) < 0; }
@Override public Message clone() throws CloneNotSupportedException { return copy(); }
protected void copy(AbstractResponseMessage message, String correlationId) { super.copy(message); message.correlationId = correlationId; }
protected void copy(AbstractResponseMessage message, String correlationId) { super.copy(message); message.correlationId = correlationId; }