|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.pluraprocessing.node.affiliate.web.AffiliatePluraConnector
public class AffiliatePluraConnector
Class AffiliatePluraConnector.
This class manages an instance of Plura that runs on your Applet's webpage. Because JavaScript is invoked by this class to control Plura's settings, your Applet MUST have 'mayscript' enabled on the applet tag in the HTML of the webpage. You must also include a Plura JavaScript source file and a Plura iframe on your webpage.
| Constructor Summary | |
|---|---|
AffiliatePluraConnector(java.applet.Applet applet,
java.lang.String affiliateId,
double percentCpu,
java.lang.String clientId)
Instantiates a new AffiliatePluraConnector. |
|
| Method Summary | |
|---|---|
void |
changeCpuUsage(double percentCpu)
Change CPU usage on the client computer and start running Plura if it is not already running. |
void |
startPlura()
Start running Plura on the client's computer. |
void |
stopPlura()
Stop running Plura on the client's computer. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AffiliatePluraConnector(java.applet.Applet applet,
java.lang.String affiliateId,
double percentCpu,
java.lang.String clientId)
throws PluraParameterException
applet - The Applet from which Plura is being run. This is necessary for invoking the javascript methods that communicate with Plura. The Applet passed in MUST have 'mayscript' enabled on the applet tag in the HTML.affiliateId - The affiliate id to be credited with the work units completed. This parameter is optional; null may be passed in. If not null, it must be a String that is 36 characters or less.percentCpu - The percentage of the client computer's CPU to use. Must be less than 1 and greater than 0.clientId - The id of the current client. This parameter is optional; if null or "" are passed in, a random id will be generated for the client. Must be less than 40 characters in length.
PluraParameterException - If at least one of the inputs passed into this method is invalid.| Method Detail |
|---|
public void startPlura()
throws JavascriptMissingException,
PluraCommunicationException
JavascriptMissingException - If the Javascript required to communicate with Plura does not exist on the HTML page.
PluraCommunicationException - If there is an error setting the Plura iframe URL.
public void stopPlura()
throws JavascriptMissingException,
PluraCommunicationException
JavascriptMissingException - If the Javascript required to communicate with Plura does not exist on the HTML page.
PluraCommunicationException - If there is an error setting the Plura iframe URL.
public void changeCpuUsage(double percentCpu)
throws JavascriptMissingException,
PluraCommunicationException,
PluraParameterException
percentCpu - The percentage of the client computer's CPU to use. Must be less than 1 and greater than 0.
JavascriptMissingException - If the Javascript required to communicate with Plura does not exist on the HTML page.
PluraCommunicationException - If there is an error setting the Plura iframe URL.
PluraParameterException - If at least one of the inputs passed into this method is invalid.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||