|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectmoj.lang.statserv.StatServConnection
public class StatServConnection
StatServConnection handles all communication with a StatServ server.
Field Summary | |
---|---|
java.net.URL |
statservURL
URL to current StatServ servlet |
Constructor Summary | |
---|---|
StatServConnection()
Create a new StatServConnection to the StatServ server given in the file StatServ.properties . |
Method Summary | |
---|---|
boolean |
addModule(StatServRequest module)
Adds a StatServRequest module to the connection. |
static void |
main(java.lang.String[] args)
|
boolean |
removeModule(StatServRequest module)
Removes a StatServRequest module from the connection. |
void |
removeModules()
Removes all StatServRequest modules from the connection. |
java.lang.String |
requestXML(java.lang.String title,
java.lang.String text)
Returns the XML that constitutes a StatServConnection request. |
boolean |
StatServConnect(java.lang.String title,
java.lang.String text)
Sends the text and title to a StatServ servlet
and lets each previously addedStatServRequest module request
and parse its own statistics, which is then made available through each
StatServRequest module respectively. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public final java.net.URL statservURL
Constructor Detail |
---|
public StatServConnection() throws java.net.MalformedURLException
StatServ.properties
.
java.net.MalformedURLException
Method Detail |
---|
public boolean addModule(StatServRequest module)
StatServRequest
module to the connection.
module
- StatServRequest
module to add
true
on success, else false
public boolean removeModule(StatServRequest module)
StatServRequest
module from the connection.
module
- StatServRequest
module to remove
true
on success, else false
public void removeModules()
StatServRequest
modules from the connection.
public java.lang.String requestXML(java.lang.String title, java.lang.String text)
StatServConnection
request.
title
- the title of the document statistics is requested fortext
- the text statistics is requested for
StatServConnection
requestpublic boolean StatServConnect(java.lang.String title, java.lang.String text)
text
and title
to a StatServ servlet
and lets each previously addedStatServRequest
module request
and parse its own statistics, which is then made available through each
StatServRequest
module respectively.
title
- the title of the document statistics is requested fortext
- the text statistics is requested for
true
on success, else false
public static void main(java.lang.String[] args) throws java.lang.Exception
java.lang.Exception
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |