Package javax.sip

Examples of javax.sip.InvalidArgumentException


   * @param spic - spi-c value
   * @throws InvalidArgumentException
   */
  public void setSPIClient(int spic) throws InvalidArgumentException {
    if (spic < 0)
      throw new InvalidArgumentException(
        "JAIN-SIP "
          + "Exception, SecurityClient, setSPIClient(), the spi-c parameter is <0");
    setParameter(ParameterNamesIms.SPI_C, spic);
  }
View Full Code Here


   * @param spis - spi-s value
   * @throws InvalidArgumentException - when value is not valid
   */
  public void setSPIServer(int spis) throws InvalidArgumentException {
    if (spis < 0)
      throw new InvalidArgumentException(
        "JAIN-SIP "
          + "Exception, SecurityClient, setSPIServer(), the spi-s parameter is <0");
    setParameter(ParameterNamesIms.SPI_S, spis);
  }
View Full Code Here

   * @param portC - port-c value
   * @throws InvalidArgumentException - when value is not valid
   */
  public void setPortClient(int portC) throws InvalidArgumentException {
    if (portC < 0)
      throw new InvalidArgumentException(
        "JAIN-SIP "
          + "Exception, SecurityClient, setPortClient(), the port-c parameter is <0");
    setParameter(ParameterNamesIms.PORT_C, portC);
  }
View Full Code Here

   * @param portS - port-s value
   * @throws InvalidArgumentException - when value is not valid
   */
  public void setPortServer(int portS) throws InvalidArgumentException {
    if (portS < 0)
      throw new InvalidArgumentException(
        "JAIN-SIP "
          + "Exception, SecurityClient, setPortServer(), the port-s parameter is <0");
    setParameter(ParameterNamesIms.PORT_S, portS);
  }
View Full Code Here

   * @param q - q parameter value
   * @throws InvalidArgumentException - when value is not valid
   */
  public void setPreference(float q) throws InvalidArgumentException {
    if (q < 0.0f)
      throw new InvalidArgumentException(
        "JAIN-SIP "
          + "Exception, SecurityClient, setPreference(), the preference (q) parameter is <0");
    setParameter(ParameterNamesIms.Q, q);
  }
View Full Code Here

        // then send INVITE+ACK later on
        if (!method.equals(Request.INVITE))
            throw new SipException("Dialog was not created with an INVITE" + method);

        if (cseqno <= 0)
            throw new InvalidArgumentException("bad cseq <= 0 ");
        else if (cseqno > ((((long) 1) << 32) - 1))
            throw new InvalidArgumentException("bad cseq > " + ((((long) 1) << 32) - 1));

        if (this.getRemoteTarget() == null) {
            throw new SipException("Cannot create ACK - no remote Target!");
        }
View Full Code Here

         * responses numbered 101 to 199 may be sent reliably. If the request did not include
         * either a Supported or Require header field indicating this feature, the UAS MUST NOT
         * send the provisional response reliably.
         */
        if (statusCode <= 100 || statusCode > 199)
            throw new InvalidArgumentException("Bad status code ");
        SIPRequest request = this.originalRequest;
        if (!request.getMethod().equals(Request.INVITE))
            throw new SipException("Bad method");

        ListIterator<SIPHeader> list = request.getHeaders(SupportedHeader.NAME);
View Full Code Here

        // then send INVITE+ACK later on
        if (!method.equals(Request.INVITE))
            throw new SipException("Dialog was not created with an INVITE" + method);

        if (cseqno <= 0)
            throw new InvalidArgumentException("bad cseq <= 0 ");
        else if (cseqno > ((((long) 1) << 32) - 1))
            throw new InvalidArgumentException("bad cseq > " + ((((long) 1) << 32) - 1));

        if (this.remoteTarget == null) {
            throw new SipException("Cannot create ACK - no remote Target!");
        }
View Full Code Here

         * responses numbered 101 to 199 may be sent reliably. If the request did not include
         * either a Supported or Require header field indicating this feature, the UAS MUST NOT
         * send the provisional response reliably.
         */
        if (statusCode <= 100 || statusCode > 199)
            throw new InvalidArgumentException("Bad status code ");
        SIPRequest request = this.originalRequest;
        if (!request.getMethod().equals(Request.INVITE))
            throw new SipException("Bad method");

        ListIterator<SIPHeader> list = request.getHeaders(SupportedHeader.NAME);
View Full Code Here

     * @param port - the Integer.valueOf value of the port of this ViaHeader
     */
    public void setPort(int port) throws InvalidArgumentException {

        if ( port!=-1 && (port<1 || port>65535)) {
            throw new InvalidArgumentException( "Port value out of range -1, [1..65535]" );
        }

        if (sentBy == null)
            sentBy = new HostPort();
        sentBy.setPort(port);
View Full Code Here

TOP

Related Classes of javax.sip.InvalidArgumentException

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.