/** Default constructor */ public Via() { super(NAME); sentProtocol = new Protocol(); }
/** set the Protocol Version * @param protocolVersion String to set */ public void setProtocolVersion(String protocolVersion) { if (sentProtocol == null) sentProtocol = new Protocol(); sentProtocol.setProtocolVersion(protocolVersion); }
/** * Sets the value of the protocol parameter. This parameter specifies * which protocol is used, for example "SIP/2.0". * * @param protocol - new value for the protocol parameter * @throws ParseException which signals that an error has been reached * unexpectedly while parsing the protocol value. */ public void setProtocol(String protocol) throws ParseException { if (protocol == null) throw new NullPointerException( "JAIN-SIP Exception, " + "Via, setProtocol(), the protocol parameter is null."); if (sentProtocol == null) sentProtocol = new Protocol(); sentProtocol.setProtocol(protocol); }
/** * Sets the value of the transport. This parameter specifies * which transport protocol to use for sending requests and responses to * this entity. The following values are defined: "udp", "tcp", "sctp", * "tls", "ws", "wss" but other values may be used also. * * @param transport - new value for the transport parameter * @throws ParseException which signals that an error has been reached * unexpectedly while parsing the transport value. */ public void setTransport(String transport) throws ParseException { if (transport == null) throw new NullPointerException( "JAIN-SIP Exception, " + "Via, setTransport(), the transport parameter is null."); if (sentProtocol == null) sentProtocol = new Protocol(); sentProtocol.setTransport(transport); }
this.lexer.SPorHT(); Protocol protocol = new Protocol(); protocol.setProtocolName(protocolName.getTokenValue()); protocol.setProtocolVersion(protocolVersion.getTokenValue());
this.lexer.SPorHT(); Protocol protocol = new Protocol(); protocol.setProtocolName(protocolName.getTokenValue()); protocol.setProtocolVersion(protocolVersion.getTokenValue());