com.blackledge.david.tivo.hmoclient
Class HMOSession

java.lang.Object
  extended by com.blackledge.david.tivo.hmoclient.HMOSession

public class HMOSession
extends Object

Class to track a client session against an HMO server, e.g. a Tivo.


Field Summary
static String COMMAND_QUERY_CONTAINER
           
static String COMMAND_QUERY_FORMATS
           
static String COMMAND_QUERY_ITEM
           
static String COMMAND_QUERY_SERVER
           
static String COMMAND_RESET_SERVER
           
 
Constructor Summary
HMOSession(URL host)
           
 
Method Summary
 void closeSession()
          Alias for resetSession - call this when you're done so the server will free up resources.
 URL getBaseURL()
           
 URL getCommandURL(String command, Map additionalParameters)
          Create an arbitrary command URL for this session.
 ContainerRequest newRootRequest()
           
 void resetSession()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COMMAND_QUERY_SERVER

public static final String COMMAND_QUERY_SERVER
See Also:
Constant Field Values

COMMAND_RESET_SERVER

public static final String COMMAND_RESET_SERVER
See Also:
Constant Field Values

COMMAND_QUERY_CONTAINER

public static final String COMMAND_QUERY_CONTAINER
See Also:
Constant Field Values

COMMAND_QUERY_ITEM

public static final String COMMAND_QUERY_ITEM
See Also:
Constant Field Values

COMMAND_QUERY_FORMATS

public static final String COMMAND_QUERY_FORMATS
See Also:
Constant Field Values
Constructor Detail

HMOSession

public HMOSession(URL host)
Method Detail

getCommandURL

public URL getCommandURL(String command,
                         Map additionalParameters)
Create an arbitrary command URL for this session.

Parameters:
command - the primary command (will be passed in with as the "Command" field)
additionalParameters - map of parameters - if order matters, use a LinkedHashMap.
Returns:
the appropriate URL to perform the command within this session, or null if there was an error creating the URL.

closeSession

public void closeSession()
                  throws IOException
Alias for resetSession - call this when you're done so the server will free up resources.

Throws:
IOException

resetSession

public void resetSession()
                  throws IOException
Throws:
IOException

newRootRequest

public ContainerRequest newRootRequest()

getBaseURL

public URL getBaseURL()