Package hamsam.exception

Examples of hamsam.exception.IllegalStateException


   * @throws IllegalStateException if the protocol is not connected.
   */
  public void disconnect() throws IllegalStateException
  {
    if(!(server instanceof NotificationServer))
      throw new IllegalStateException("Not yet connected to MSN");

    server.shutdown();
    eventProcessor.disconnected();
  }
View Full Code Here


   * @throws IllegalStateException if the protocol is not connected to MSN yet.
   */
  private NotificationServer checkValidNotificationServer() throws IllegalStateException
  {
    if(!(server instanceof NotificationServer))
      throw new IllegalStateException("Not logged in yet - MSN");

    return (NotificationServer) server;
  }
View Full Code Here

     * @param info ProxyInfo object
     * @see hamsam.protocol.Protocol#connect(java.lang.String, java.lang.String, hamsam.net.ProxyInfo)
     */
    public void connect(String username, String password, ProxyInfo info) throws IllegalStateException {
        if (listener == null)
            throw new IllegalStateException("Listener not set");

        listener.connecting(this);

        this.userID = username;
        this.password = password;
View Full Code Here

     * @see hamsam.protocol.Protocol#startConference(hamsam.api.Conference, java.lang.String)
     */
    public void startConference(Conference conf, String message)
        throws UnsupportedOperationException, IllegalStateException {
        if (!connected) {
            throw new IllegalStateException("not connected yet!");
        }
    }
View Full Code Here

     * @param conf conference to quit
     * @see hamsam.protocol.Protocol#quitConference(hamsam.api.Conference)
     */
    public void quitConference(Conference conf) throws UnsupportedOperationException, IllegalStateException {
        if (!connected) {
            throw new IllegalStateException("not connected yet!");
        }
    }
View Full Code Here

     * @param message Message to send to the conference
     * @see hamsam.protocol.Protocol#sendConferenceMessage(hamsam.api.Conference, hamsam.api.Message)
     */
    public void sendConferenceMessage(Conference conf, Message message) throws UnsupportedOperationException, IllegalStateException {
        if (!connected) {
            throw new IllegalStateException("not connected yet!");
        }
    }
View Full Code Here

     * @param buddy Buddy to be added to the Buddy List
     * @see hamsam.protocol.Protocol#addToBuddyList(hamsam.api.Buddy)
     */
    public void addToBuddyList(Buddy buddy) throws IllegalArgumentException, IllegalStateException {
        if (!connected) {
            throw new IllegalStateException("not connected yet!");
        }
        cmdHandler.addToBuddyList(buddy);
        //todo need to be sure it worked!
        listener.buddyAdded(buddy);
    }
View Full Code Here

     * @param buddy Buddy to be deleted from the Buddy List
     * @see hamsam.protocol.Protocol#deleteFromBuddyList(hamsam.api.Buddy)
     */
    public void deleteFromBuddyList(Buddy buddy) throws IllegalArgumentException, IllegalStateException {
        if (!connected) {
            throw new IllegalStateException("not connected yet!");
        }
        cmdHandler.deleteFromBuddyList(buddy);
        //todo need to be sure it worked
        listener.buddyDeleted(buddy);
    }
View Full Code Here

     * @param buddy Buddy to ignore
     * @see hamsam.protocol.Protocol#ignoreBuddy(hamsam.api.Buddy)
     */
    public void ignoreBuddy(Buddy buddy) throws UnsupportedOperationException, IllegalStateException {
        if (!connected) {
            throw new IllegalStateException("not connected yet!");
        }
        //TODO think this means making them invisible - double check this
        cmdHandler.ignoreBuddy(buddy);
        listener.buddyIgnored(buddy);
    }
View Full Code Here

     * @param buddy Buddy to unignore
     * @see hamsam.protocol.Protocol#unignoreBuddy(hamsam.api.Buddy)
     */
    public void unignoreBuddy(Buddy buddy) throws UnsupportedOperationException, IllegalStateException {
        if (!connected) {
            throw new IllegalStateException("not connected yet!");
        }
        //TODO think this means making them visible again - remove from invisible
        cmdHandler.unIgnoreBuddy(buddy);
        listener.buddyUnignored(buddy);
    }
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.