summaryrefslogtreecommitdiff
path: root/same/src/main/java/com
diff options
context:
space:
mode:
Diffstat (limited to 'same/src/main/java/com')
-rw-r--r--same/src/main/java/com/orbekk/same/Client.java7
-rw-r--r--same/src/main/java/com/orbekk/same/ClientInterface.java1
2 files changed, 8 insertions, 0 deletions
diff --git a/same/src/main/java/com/orbekk/same/Client.java b/same/src/main/java/com/orbekk/same/Client.java
index 244a64d..b496aac 100644
--- a/same/src/main/java/com/orbekk/same/Client.java
+++ b/same/src/main/java/com/orbekk/same/Client.java
@@ -9,6 +9,7 @@ import org.codehaus.jackson.type.TypeReference;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import com.orbekk.same.State.Component;
import com.orbekk.util.WorkQueue;
public class Client implements DiscoveryListener {
@@ -50,6 +51,12 @@ public class Client implements DiscoveryListener {
}
@Override
+ public void set(Component component) throws UpdateConflict {
+ set(component.getName(), component.getData(),
+ component.getRevision());
+ }
+
+ @Override
public void addStateListener(StateChangedListener listener) {
stateListeners.add(listener);
}
diff --git a/same/src/main/java/com/orbekk/same/ClientInterface.java b/same/src/main/java/com/orbekk/same/ClientInterface.java
index 99adf21..4b4c731 100644
--- a/same/src/main/java/com/orbekk/same/ClientInterface.java
+++ b/same/src/main/java/com/orbekk/same/ClientInterface.java
@@ -3,6 +3,7 @@ package com.orbekk.same;
public interface ClientInterface {
State getState();
void set(String name, String data, long revision) throws UpdateConflict;
+ void set(State.Component component) throws UpdateConflict;
void addStateListener(StateChangedListener listener);
void removeStateListener(StateChangedListener listener);
} \ No newline at end of file