1. Miguel Ángel García
  2. distribot

Commits

Miguel Ángel García  committed 345b72a

improving the .ICE file

  • Participants
  • Parent commits eadd51a
  • Branches master

Comments (0)

Files changed (3)

File README.markdown

View file
 ==============
 
 In Debian/Ubuntu, install, use the steps:
+
 1. # apt-get install libzeroc-ice3.4-java
 1. $ mvn install:install-file -Dfile=/usr/share/ant/lib/ant-ice.jar -DgroupId=com.zeroc -DartifactId=ant-ice -Dversion=3.4.2 -Dpackaging=jar
 1. $ mvn install:install-file -Dfile=/usr/share/java/Ice.jar -DgroupId=com.zeroc -DartifactId=ice -Dversion=3.4.2 -Dpackaging=jar

File distribot-comms/src/main/resources/distribot.ice

View file
  */
 module Distribot {
     struct JobDefinition {
+        string id;
         string name;
     };
 
     struct TaskDefinition {
+        string id;
         string name;
     };
 
+    struct ResourceDefinition {
+        string id;
+        string name;
+        string hostname;
+        int port;
+    };
+
+    sequence<JobDefinition> JobDefinitionList;
+    sequence<ResourceDefinition> ResourceDefinitionList;
+
     interface Core {
         bool check ();
+
+        void addJob ( JobDefinition jobdef );
+        void delJob ( string jobDefinitionName );
+        void updateJob ( JobDefinition jobdef );
+        JobDefinition getJob ( string jobName );
+        JobDefinitionList getJobList ();
     };
 
     interface Executor {
         bool check ();
+
         void execute ( JobDefinition jobdef);
+
+        void addResource ( ResourceDefinition resource );
+        void delResource ( string resourceName );
+        void updateResource ( ResourceDefinition resource );
+        ResourceDefinition getResource ( string resourceName );
+        ResourceDefinitionList getResourceList ();
     };
 
     interface Worker {

File distribot-executor/src/main/java/org/magmax/distribot/executor/Executor.java

View file
 package org.magmax.distribot.executor;
 
 import Distribot.JobDefinition;
+import Distribot.ResourceDefinition;
 import Ice.Current;
 
 /**
     public void execute(JobDefinition jd, Current crnt) {
         // TODO
     }
+
+    public void addResource(ResourceDefinition rd, Current crnt) {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    public void delResource(String string, Current crnt) {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    public void updateResource(ResourceDefinition rd, Current crnt) {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    public ResourceDefinition getResource(String string, Current crnt) {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    public ResourceDefinition[] getResourceList(Current crnt) {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
     
 }