/** Constructor given the call Identifier. *@param callId string call identifier (should be localid@host) *@throws IllegalArgumentException if call identifier is bad. */ public Replaces(String callId) throws IllegalArgumentException { super(NAME); this.callIdentifier = new CallIdentifier(callId); }
/** * Returns the Call-Id of InReplyToHeader. The CallId parameter uniquely * identifies a series of messages within a dialogue. * * @return the String value of the Call-Id of this InReplyToHeader */ public String getCallId() { if (callId == null) return null; return callId.encode(); }
/** * constructor * @param cid String to set * @throws IllegalArgumentException if cid is null or is not a token, * or token@token */ public CallIdentifier(String cid) throws IllegalArgumentException { setCallID(cid); }
public Object clone() { InReplyTo retval = (InReplyTo) super.clone(); if (this.callId != null) retval.callId = (CallIdentifier) this.callId.clone(); return retval; } }
public Object clone() { CallID retval = (CallID) super.clone(); if (this.callIdentifier != null) retval.callIdentifier = (CallIdentifier) this.callIdentifier.clone(); return retval; } }
/** Constructor given the call Identifier. *@param callId string call identifier (should be localid@host) *@throws IllegalArgumentException if call identifier is bad. */ public Join(String callId) throws IllegalArgumentException { super(NAME); this.callIdentifier = new CallIdentifier(callId); }
protected StringBuilder encodeBody(StringBuilder buffer) { if (callIdentifier != null) callIdentifier.encode(buffer); return buffer; }
/** Constructor given the call Identifier. *@param callId string call identifier (should be localid@host) *@throws IllegalArgumentException if call identifier is bad. */ public CallID(String callId) throws IllegalArgumentException { super(NAME); this.callIdentifier = new CallIdentifier(callId); }
/** * Generate canonical form of the header. * @return String */ public StringBuilder encodeBody(StringBuilder retval) { return callId.encode(retval); }
/** * set the CallId field * @param cid String to set. This is the body part of the Call-Id * header. It must have the form localId@host or localId. * @throws IllegalArgumentException if cid is null, not a token, or is * not a token@token. */ public void setCallId(String cid) throws ParseException { try { callIdentifier = new CallIdentifier(cid); } catch (IllegalArgumentException ex) { throw new ParseException(cid, 0); } }
/** * Get the encoded version of this id. * @return String to set */ public String encode() { return encode(new StringBuilder()).toString(); }
/** * Sets the Call-Id of the InReplyToHeader. The CallId parameter uniquely * identifies a serious of messages within a dialogue. * * @param callId - the string value of the Call-Id of this InReplyToHeader. * @throws ParseException which signals that an error has been reached * unexpectedly while parsing the callId value. */ public void setCallId(String callId) throws ParseException { try { this.callId = new CallIdentifier(callId); } catch (Exception e) { throw new ParseException(e.getMessage(), 0); } }