X-Git-Url: http://git.nikiroo.be/?p=nikiroo-utils.git;a=blobdiff_plain;f=src%2Fbe%2Fnikiroo%2Futils%2Fserial%2Fserver%2FConnectActionClient.java;fp=src%2Fbe%2Fnikiroo%2Futils%2Fserial%2FConnectActionClient.java;h=626b62f78494ab4fdb818220629a281bc3507f14;hp=83537025d00e103adc127ebad31b096129609f85;hb=79ce1a4973eba079ba819ba841d906de42f38e40;hpb=d463d2663337bb11aaeab48a06d2b3091c3b7830 diff --git a/src/be/nikiroo/utils/serial/ConnectActionClient.java b/src/be/nikiroo/utils/serial/server/ConnectActionClient.java similarity index 69% rename from src/be/nikiroo/utils/serial/ConnectActionClient.java rename to src/be/nikiroo/utils/serial/server/ConnectActionClient.java index 8353702..626b62f 100644 --- a/src/be/nikiroo/utils/serial/ConnectActionClient.java +++ b/src/be/nikiroo/utils/serial/server/ConnectActionClient.java @@ -1,4 +1,4 @@ -package be.nikiroo.utils.serial; +package be.nikiroo.utils.serial.server; import java.io.IOException; import java.net.Socket; @@ -13,8 +13,13 @@ import be.nikiroo.utils.Version; * * @author niki */ -public class ConnectActionClient { - private ConnectAction action; +abstract class ConnectActionClient { + /** + * The underlying {@link ConnectAction}. + *

+ * Cannot be NULL. + */ + protected ConnectAction action; /** * Create a new {@link ConnectActionClient} with the current application @@ -127,31 +132,6 @@ public class ConnectActionClient { public void action(Version serverVersion) throws Exception { } - /** - * Serialise and send the given object to the server (and return the - * deserialised answer). - * - * @param data - * the data to send - * - * @return the answer, which can be NULL - * - * @throws IOException - * in case of I/O error - * @throws NoSuchFieldException - * if the serialised data contains information about a field - * which does actually not exist in the class we know of - * @throws NoSuchMethodException - * if a class described in the serialised data cannot be created - * because it is not compatible with this code - * @throws ClassNotFoundException - * if a class described in the serialised data cannot be found - */ - public Object send(Object data) throws IOException, NoSuchFieldException, - NoSuchMethodException, ClassNotFoundException { - return action.send(data); - } - /** * Handler called when an unexpected error occurs in the code. *

@@ -162,24 +142,4 @@ public class ConnectActionClient { */ protected void onError(@SuppressWarnings("unused") Exception e) { } - - // old stuff: - - /** - * Do not use. Will never be called. - */ - @SuppressWarnings({ "unused", "javadoc" }) - @Deprecated - protected void onClientVersionReceived(Version clientVersion) { - } - - /** - * Do not use, it is not supposed to be called from the outside. - */ - @SuppressWarnings({ "unused", "javadoc" }) - @Deprecated - public Object flush() throws NoSuchFieldException, NoSuchMethodException, - ClassNotFoundException, IOException, java.lang.NullPointerException { - return null; - } } \ No newline at end of file