|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdarx.DarxTask
public class DarxTask
This is the wrapper that represents an agent's replica at the DARX level. It provides control over the replica's execution, thus DARX can:
TaskShell
,
Serialized FormField Summary | |
---|---|
protected boolean |
leader
the status of this replica in the group. |
Constructor Summary | |
---|---|
protected |
DarxTask(java.lang.String name)
Constructs a new agent replica from scratch. |
Method Summary | |
---|---|
RemoteTask |
activateTask(java.lang.String url,
int port_nb)
Requests a new task activation on a specific DARX server. |
protected DarxTask |
cloneTask()
Constructs a new agent replica from an existing replica. |
RemoteTask |
findTask(java.lang.String task_name)
Generates a remote reference to the current leader of the task which corresponds to the given generic name. |
java.lang.String |
getTaskName()
Returns the name of the generic task pursued by this replica. |
void |
receiveAsyncMessage(java.lang.Object msg)
Starts the reception of an asynchronous message. |
java.io.Serializable |
receiveSyncMessage(java.lang.Object msg)
Starts the reception of a synchronous message. |
void |
resume()
resumes the replica's execution |
void |
setHandle(RemoteTask remote)
Sets the handle attribute (RemoteTask) of this task. |
void |
start()
starts the replica's execution |
void |
suspend()
suspends the replica's execution |
void |
terminate()
Ends the execution of this specific replica. |
void |
terminateTask()
Ends the generic task execution. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected boolean leader
Constructor Detail |
---|
protected DarxTask(java.lang.String name)
name
- the name of the generic agent.Method Detail |
---|
protected DarxTask cloneTask()
public java.lang.String getTaskName()
public void setHandle(RemoteTask remote)
public void receiveAsyncMessage(java.lang.Object msg)
public java.io.Serializable receiveSyncMessage(java.lang.Object msg)
public RemoteTask activateTask(java.lang.String url, int port_nb) throws java.rmi.RemoteException
url
- the url of the chosen location (port nb not included)port_nb
- the port number of the chosen server
java.rmi.RemoteException
public RemoteTask findTask(java.lang.String task_name) throws DarxException
NameServer
services.
DarxException
Darx.findTask(String task_name)
public void start()
public void suspend()
public void resume()
public void terminate()
public void terminateTask()
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |