|
Lightweight Bartering Grid | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectlbg.user.UserAgent
lbg.user.LiveUserAgent
lbg.user.EmbeddedLiveUserAgent
public class EmbeddedLiveUserAgent
An EmbeddedLiveUserAgent is a LiveUserAgent intended to be run within another software.
The User service is immediately created in a separate thread.
| Constructor Summary | |
|---|---|
EmbeddedLiveUserAgent(java.lang.String id,
java.lang.String user_hostname,
int user_port,
UserPeerHandle peer_handle,
java.lang.String output_dir)
Creates an EmbeddedLiveUserAgent. |
|
| Method Summary | |
|---|---|
static java.util.Properties |
describeEmbeddedJob(int task_count,
java.lang.String embedded_task_jar,
java.lang.String embedded_task_main,
int embedded_task_port,
java.lang.String ctrlr_hostname,
int ctrlr_port)
Describes, as a Properties and with the target values, a Job to be sumbitted by an EmbeddedLiveUserAgent (convenience method). |
static void |
main(java.lang.String[] args)
|
static void |
shutdownUser(EmbeddedLiveUserAgent user)
Gracefully shutdown target EmbeddedLiveUserAgent (convenience method). |
static EmbeddedLiveUserAgent |
startUser(java.lang.String user_hostname,
int user_port,
java.lang.String peer_hostname,
int peer_port,
java.lang.String user_logs_dir)
Creates a new EmbeddedLiveUserAgent (convenience method). |
int |
submitJob(java.util.Properties jdf_props)
Submits a Job. |
static int |
submitJobToTheGrid(EmbeddedLiveUserAgent user,
java.util.Properties jdf_props)
Makes target EmbeddedLiveUserAgent submit a Job from target JDF (convenience method). |
java.lang.String |
toString()
String representation of the User. |
| Methods inherited from class lbg.user.LiveUserAgent |
|---|
completedJobs, hasRunningJobs, host, isAlive, notifyCompletedJob, notifyCompletedTask, port, registerListener, service, startService, startService, submitJob, submittedJobs, unRegisterListener |
| Methods inherited from class lbg.user.UserAgent |
|---|
id, usedPeer |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public EmbeddedLiveUserAgent(java.lang.String id,
java.lang.String user_hostname,
int user_port,
UserPeerHandle peer_handle,
java.lang.String output_dir)
throws GridException
id - User iduser_hostname - User hostnameuser_port - User portpeer_handle - used Peeroutput_dir - path to the directory where log files will be saved
GridException - if a parameter is illegal,
or if the used Peer cannot be contacted| Method Detail |
|---|
public java.lang.String toString()
LiveUserAgent
toString in class LiveUserAgent
public int submitJob(java.util.Properties jdf_props)
throws GridException
jdf_props - descriptor of the Job to submit, stored as Properties
GridException - if a Job with the same id has already been sent
public static EmbeddedLiveUserAgent startUser(java.lang.String user_hostname,
int user_port,
java.lang.String peer_hostname,
int peer_port,
java.lang.String user_logs_dir)
The User service is immediately created in a separate thread.
user_hostname - User hostnameuser_port - User portpeer_hostname - Peer hostnamepeer_port - User portuser_logs_dir - path to the directory where log files will be saved
public static int submitJobToTheGrid(EmbeddedLiveUserAgent user,
java.util.Properties jdf_props)
user - target Userjdf_props - target JDF
public static void shutdownUser(EmbeddedLiveUserAgent user)
Basically, waits for all Jobs to complete cleanly, i.e. that all results are successfully uploaded.
user - target User
public static java.util.Properties describeEmbeddedJob(int task_count,
java.lang.String embedded_task_jar,
java.lang.String embedded_task_main,
int embedded_task_port,
java.lang.String ctrlr_hostname,
int ctrlr_port)
task_count - Task countembedded_task_jar - path to application jar of embedded Taskembedded_task_main - main class of application jarctrlr_hostname - hostname of server to be contacted by embedded Taskctrlr_port - port of server to be contacted by embedded Task
public static void main(java.lang.String[] args)
throws java.lang.Exception
java.lang.Exception
|
Lightweight Bartering Grid | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Copyright (c) 2005-2008, Cyril Briquet, parts Xavier Dalem.