darx
Interface DarxServer

All Superinterfaces:
java.rmi.Remote
All Known Implementing Classes:
Darx

interface DarxServer
extends java.rmi.Remote

This is the server interface which, as main objective, provides the means for running DARX tasks on a specific location. A location is a logical network node defined by its URL and its port number.


Method Summary
 TaskShellHandle createReplicant(ReplicantInfo info, DarxTask task)
          Creates a task replica on the current server.
 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.
 void killReplicant(java.lang.String darx_name)
          Destroys the local replicant corresponding to the specified task.
 RemoteTask startTask(DarxTask task)
          Starts the execution of a new replication group leader on the current server.
 

Method Detail

startTask

RemoteTask startTask(DarxTask task)
                     throws java.rmi.RemoteException
Starts the execution of a new replication group leader on the current server.

Parameters:
task - the DarxTask to be started on this server.
Returns:
the handle for the started task; to be used for user purposes, such as (un)replication or policy modification.
Throws:
java.rmi.RemoteException
See Also:
DarxTask.activateTask(String, int)

createReplicant

TaskShellHandle createReplicant(ReplicantInfo info,
                                DarxTask task)
                                throws java.rmi.RemoteException
Creates a task replica on the current server. This method is called by the TaskShell of the group leader when it has to be replicated.

Parameters:
info - the ReplicantInfo of the new replica.
task - the DarxTask to be replicated on this server.
Returns:
the remote reference to the newly created replica
Throws:
java.rmi.RemoteException

killReplicant

void killReplicant(java.lang.String darx_name)
                   throws java.rmi.RemoteException
Destroys the local replicant corresponding to the specified task. This includes unreferencing the doomed replicant on the local RMI server and on the name server.

Parameters:
task_name - the name of the task to which the replicant belongs
Throws:
java.rmi.RemoteException

findTask

RemoteTask findTask(java.lang.String task_name)
                    throws java.rmi.RemoteException
Generates a remote reference to the current leader of the task which corresponds to the given generic name. If the current leader cannot be contacted, it is assumed that the host has failed, and therefore a new leader election is launched through the NameServer services.

Throws:
java.rmi.RemoteException