Package hamsam.exception

Examples of hamsam.exception.IllegalStateException


   *                               {@link #setListener(IMListener) setListener} method.
   */
  public void connect(String username, String password, ProxyInfo info) throws IllegalStateException
  {
    if(listener == null)
      throw new IllegalStateException("Listener not set");

    listener.connecting(this);

    this.yahooID = username.toLowerCase();
    this.password = password;
View Full Code Here


   * @throws IllegalStateException if the protocol is not connected.
   */
  public void disconnect() throws IllegalStateException
  {
    if(reader == null || writer == null)
      throw new IllegalStateException("Not yet connected to Yahoo");

    // send the logoff packet
    Packet pack = new Packet(SERVICE_LOGOFF, STATUS_AVAILABLE, sessionID);
    sendToWriterThread(pack);

View Full Code Here

   * @throws IllegalStateException if not logged in to Yahoo
   */
  private void checkConnected() throws IllegalStateException
  {
    if(!connected)
      throw new IllegalStateException("Not connected to Yahoo yet");
  }
View Full Code Here

   *                               nor HTTP.
   */
  public void setUsername(String username) throws IllegalStateException
  {
    if(type != SOCKS5 && type != HTTP)
      throw new IllegalStateException("Proxy type must be SOCKS5 or HTTP");

    this.username = username;
  }
View Full Code Here

   *                               nor HTTP.
   */
  public void setPassword(String password) throws IllegalStateException
  {
    if(type != SOCKS5 && type != HTTP)
      throw new IllegalStateException("Proxy type must be SOCKS5 or HTTP");

    this.password = password;
  }
View Full Code Here

   *                               nor HTTP.
   */
  public String getUsername() throws IllegalStateException
  {
    if(type != SOCKS5 && type != HTTP)
      throw new IllegalStateException("Proxy type must be SOCKS5 or HTTP");

    return username;
  }
View Full Code Here

   *                               nor HTTP.
   */
  public String getPassword() throws IllegalStateException
  {
    if(type != SOCKS5 && type != HTTP)
      throw new IllegalStateException("Proxy type must be SOCKS5 or HTTP");

    return password;
  }
View Full Code Here

                  serverName, serverPort,
                  username, password,
                  hostname, port);
        break;
      default:
        throw new IllegalStateException("Unknown proxy type");
    }

    return conn;
  }
View Full Code Here

   *                               {@link #setListener(IMListener) setListener} method.
   */
  public synchronized void connect(String username, String password, ProxyInfo info) throws IllegalStateException
  {
    if(listener == null)
      throw new IllegalStateException("IMListener not set for this protocol");

    if(this.server instanceof NotificationServer)
      disconnect();

    this.username = username;
View Full Code Here

    {
      NotificationServer ns = (NotificationServer) server;
      ns.changeStatus(code);
    }
    else
      throw new IllegalStateException("Not yet connected to MSN");
  }
View Full Code Here

TOP

Related Classes of hamsam.exception.IllegalStateException

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.