net.sac.web.agent
Class Agent

java.lang.Object
  extended by net.sac.web.agent.Agent

public class Agent
extends java.lang.Object

Agent provides a means for logging into and interacting with a password protected website.

Author:
Scott Arnold

Nested Class Summary
static class Agent.UserAgent
           
 
Constructor Summary
Agent(AgentConfiguration config)
           
 
Method Summary
 AgentConfiguration getAgentConfiguration()
           
 int getUrlReads()
           
 java.net.URLConnection login()
           
 java.net.URLConnection loginAs(java.lang.String loginId, java.lang.String password)
           
 void masqueradeAs(Agent.UserAgent userAgent)
           
 java.net.URLConnection openConnection(java.lang.String url)
           
 java.net.URLConnection openConnection(java.net.URL url)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Agent

public Agent(AgentConfiguration config)
Method Detail

getUrlReads

public int getUrlReads()

getAgentConfiguration

public AgentConfiguration getAgentConfiguration()

masqueradeAs

public void masqueradeAs(Agent.UserAgent userAgent)

login

public java.net.URLConnection login()
                             throws AgentException
Throws:
AgentException

loginAs

public java.net.URLConnection loginAs(java.lang.String loginId,
                                      java.lang.String password)
                               throws AgentException
Throws:
AgentException

openConnection

public java.net.URLConnection openConnection(java.net.URL url)
                                      throws java.io.IOException
Throws:
java.io.IOException

openConnection

public java.net.URLConnection openConnection(java.lang.String url)
                                      throws java.io.IOException
Throws:
java.io.IOException