org.swhite.daap
Class LoginResponse

java.lang.Object
  extended byorg.swhite.daap.LoginResponse

public class LoginResponse
extends java.lang.Object

LoginResponse holds the data received from a /login request to a daap server. Created on Tuesday May 20, 2003

Author:
Steve White

Constructor Summary
LoginResponse(byte[] data)
          Constructs a new LoginResponse with the specified daap data.
LoginResponse(java.lang.String hostname)
          Constructs a new LoginResponse with default port of 3689
LoginResponse(java.lang.String hostname, int port)
          Constructs a new LoginResponse
LoginResponse(java.net.URL url)
          Constructs a new LoginResponse with the data from the specified URL.
 
Method Summary
 int getSessionID()
          Returns the session id (daap tag mlid).
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LoginResponse

public LoginResponse(byte[] data)
              throws ParserException
Constructs a new LoginResponse with the specified daap data.

Parameters:
data - Raw daap data

LoginResponse

public LoginResponse(java.net.URL url)
              throws java.io.IOException,
                     ParserException
Constructs a new LoginResponse with the data from the specified URL.

Parameters:
url - URL containing the LoginResponse, e.g. http://localhost:3689/login

LoginResponse

public LoginResponse(java.lang.String hostname)
              throws java.io.IOException,
                     java.net.MalformedURLException,
                     ParserException
Constructs a new LoginResponse with default port of 3689

Parameters:
hostname - The hostname of the daap server

LoginResponse

public LoginResponse(java.lang.String hostname,
                     int port)
              throws java.io.IOException,
                     java.net.MalformedURLException,
                     ParserException
Constructs a new LoginResponse

Parameters:
hostname - The hostname of the daap server
port - The port number the daap server is listening on
Method Detail

getSessionID

public int getSessionID()
Returns the session id (daap tag mlid). The session id is needed for all subsequent requests.

Returns:
int

toString

public java.lang.String toString()