|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--dataprovider.net.NetService
Abstrakte Superklasse f?r Netz-Services, wie zum Beispiel HTTPNetService und FTPNetService.
HTTPNetService,
FTPNetService| Field Summary | |
private static int |
defaultTimeout
|
(package private) static int |
HTMLTEXTNETRESULT
|
protected java.lang.String |
password
|
(package private) static int |
TEXTNETRESULT
|
protected int |
timeout
|
protected static java.util.TreeMap |
typeMap
|
protected java.lang.String |
user
|
| Constructor Summary | |
NetService()
|
|
| Method Summary | |
(package private) static void |
|
protected static NetResult |
composeNetResult(java.lang.String contentType,
java.lang.String url,
java.lang.String rawContent,
java.util.Date download,
java.util.Date lastModified)
Komponiert den passenden NetResult. |
static NetResult[] |
concurrentlyGetNetResults(java.lang.String[] urls)
Diese Methode l?dt PARALLEL NetResults. |
abstract NetResult |
getNetResult(java.lang.String url)
Diese Methode liefert den Inhalt der ?bergebenen URL. |
static NetResult |
getNetResultWithURLConnection(java.lang.String url)
Die statische Methode getNetResultWithURLConnection(String) versucht den Inhalt der uebergebenen URL zu laden und gibt schliesslich diesen in Form eines passenden NetResults zurueck. |
static NetService |
getNetService(java.lang.String url)
Die statische Methode getNetService(String) liefert zu der ?bergebenen URL eine Instanz einer abgeleiteten Klasse von NetService, die den zu der URL passenden Service realisiert. |
static void |
setDefaultTimeout(int secs)
Diese Methode legt den Timeout in Sekunden fest, der bei der Instanzierung einer Subklasse als Anfangswert bei dieser Instanz gelten soll. |
void |
setPassword(java.lang.String password)
Setzt das Passwort fuer die Authentifikation. |
void |
setTimeout(int timeout)
Setzt den Verbindungs-Timeout, falls ein solcher erwuenscht ist; default: kein timeout. |
void |
setUser(java.lang.String userName)
Setzt den Nutzernamen bei Anfragen, die eine Authentifikation erfordern. |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
registerNatives,
toString,
wait,
wait,
wait |
| Field Detail |
private static int defaultTimeout
protected int timeout
protected java.lang.String user
protected java.lang.String password
protected static java.util.TreeMap typeMap
static final int HTMLTEXTNETRESULT
static final int TEXTNETRESULT
| Constructor Detail |
public NetService()
| Method Detail |
public static void setDefaultTimeout(int secs)
public void setTimeout(int timeout)
timeout - Der gewünschte Timeout in Sekunden.public void setUser(java.lang.String userName)
userName - Der Benutzername.public void setPassword(java.lang.String password)
password - Das Passwort.
public abstract NetResult getNetResult(java.lang.String url)
throws NetServiceException,
java.net.MalformedURLException
NetResult bzw. einer abgeleiteten Klasse dieser.NetResult
public static NetService getNetService(java.lang.String url)
throws NetServiceNoSuchServiceException,
java.net.MalformedURLException
Einbindungsbeispiel:
NetService service;
try { service = NetService.getNetService ("http://www.vh1.de" ); };
catch ... ;
Die Variable service ist jetzt eine Instanz von HTTPNetService.
public static NetResult getNetResultWithURLConnection(java.lang.String url)
throws NetServiceException,
java.net.MalformedURLException
public static NetResult[] concurrentlyGetNetResults(java.lang.String[] urls)
throws NetServiceTimeoutException
static void()
protected static NetResult composeNetResult(java.lang.String contentType,
java.lang.String url,
java.lang.String rawContent,
java.util.Date download,
java.util.Date lastModified)
throws NetServiceException,
java.net.MalformedURLException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||