gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r20932 - in gnunet-java: . doc src/org/gnunet/construct src


From: gnunet
Subject: [GNUnet-SVN] r20932 - in gnunet-java: . doc src/org/gnunet/construct src/org/gnunet/construct/parsers src/org/gnunet/core src/org/gnunet/dht src/org/gnunet/nse src/org/gnunet/statistics src/org/gnunet/util src/org/grothoff test/org/gnunet/construct
Date: Wed, 11 Apr 2012 01:08:27 +0200

Author: dold
Date: 2012-04-11 01:08:27 +0200 (Wed, 11 Apr 2012)
New Revision: 20932

Added:
   gnunet-java/src/org/gnunet/construct/FillWith.java
   gnunet-java/src/org/gnunet/construct/NestedMessage.java
   gnunet-java/src/org/gnunet/construct/parsers/FillIntegerParser.java
   gnunet-java/src/org/gnunet/construct/parsers/IntegerUtil.java
   gnunet-java/src/org/gnunet/util/ATSInformation.java
Removed:
   gnunet-java/src/org/gnunet/construct/Fill.java
   gnunet-java/src/org/gnunet/construct/MessageHeader.java
   gnunet-java/src/org/gnunet/construct/Nested.java
   gnunet-java/src/org/gnunet/util/HashCodeMessage.java
   gnunet-java/src/org/gnunet/util/PeerIdentityMessage.java
Modified:
   gnunet-java/ISSUES
   gnunet-java/doc/gnunet-exercise.tex
   gnunet-java/src/org/gnunet/construct/Construct.java
   gnunet-java/src/org/gnunet/construct/parsers/IntegerParser.java
   gnunet-java/src/org/gnunet/core/Core.java
   gnunet-java/src/org/gnunet/dht/DistributedHashTable.java
   gnunet-java/src/org/gnunet/nse/NetworkSizeEstimation.java
   gnunet-java/src/org/gnunet/statistics/Statistics.java
   gnunet-java/src/org/gnunet/util/Client.java
   gnunet-java/src/org/gnunet/util/GnunetMessage.java
   gnunet-java/src/org/gnunet/util/HashCode.java
   gnunet-java/src/org/gnunet/util/PeerIdentity.java
   gnunet-java/src/org/gnunet/util/Resolver.java
   gnunet-java/src/org/gnunet/util/Server.java
   gnunet-java/src/org/gnunet/util/Service.java
   gnunet-java/src/org/grothoff/Runabout.java
   gnunet-java/test/org/gnunet/construct/ByteFillMessage.java
   gnunet-java/test/org/gnunet/construct/QueryMessage.java
   gnunet-java/test/org/gnunet/construct/SimpleTestMessage.java
   gnunet-java/test/org/gnunet/construct/SizeTestMessage.java
Log:
work in progress on core and server/service, changes/additions to construct

Modified: gnunet-java/ISSUES
===================================================================
--- gnunet-java/ISSUES  2012-04-10 20:56:54 UTC (rev 20931)
+++ gnunet-java/ISSUES  2012-04-10 23:08:27 UTC (rev 20932)
@@ -342,4 +342,57 @@
 * Server/Service API
  *
 
-* should I check in stuff like the installer binary etc.?
\ No newline at end of file
+* should I check in stuff like the installer binary etc.?
+
+
+========================================================================================
+
+* why is installing gnunet so compilicated?
+ * e.g. stuff like "base of XYZ installation" in ./configure is very confusing
+ * many dependencies with out-of-date packages on common distros
+
+
+
+
+
address@hidden
+UInt32Message[] foo;
+
+vs.
+
address@hidden
+int[] foo;
+
+vs.
+
+// Fill would then work with number annotations and @Nested (default)
address@hidden @UInt32
+int[] foo;
+
+
+* server:
+ * what is a MessageStreamTokenizer and why does it belong to the server?
+  * my guess: for fragmented messages inside other messages?
+
+
+* discuss: the size parameter in the various notifyTransmitReady methods
+ * annoying to use from the java perspective
+ * proposal: keep for c api compatibility, introduce additional version that
+   gets a message object directly, and calls a continuation to notify about 
success/failure
+
+* core:
+ * comment in core_connect talks about timout, but there is no timeout 
parameter.
+ * GNUNET_MESSAGE_TYPE_CORE_NOTIFY_STATUS_CHANGE not used
+  * also GNUNET_CORE_OPTION_SEND_STATUS_CHANGE
+ * inconsistency in structs with trailing ATS information 
(NotifyTrafficMessage vs ConnectNotifyMessage)
+  * why zero-termination *and* size field?
+ * what happens when we can't connect to core / lose connection? in the c api 
implementation, this is never handeled?
+  * why is there even the init callback if init can't fail?
+
+
+* GNUNET_SERVER_connect_socket: ?????
+* disabling cork in java? is it possible?
+
+
+* what about allocation of message IDs for extesions / what about clashes?
+

Modified: gnunet-java/doc/gnunet-exercise.tex
===================================================================
--- gnunet-java/doc/gnunet-exercise.tex 2012-04-10 20:56:54 UTC (rev 20931)
+++ gnunet-java/doc/gnunet-exercise.tex 2012-04-10 23:08:27 UTC (rev 20932)
@@ -26,6 +26,8 @@
 This tutorial assumes that you have gnunet$\geq$0.9.2 installed on your system.
 Instructions on how to do this can be found at 
\url{https://gnunet.org/installation}.
 
+TODO: ./configure --enable-javaports
+
 Make sure that the default gnunet services are running by typing
 \begin{lstlisting}
 gnunet-arm -I

Modified: gnunet-java/src/org/gnunet/construct/Construct.java
===================================================================
--- gnunet-java/src/org/gnunet/construct/Construct.java 2012-04-10 20:56:54 UTC 
(rev 20931)
+++ gnunet-java/src/org/gnunet/construct/Construct.java 2012-04-10 23:08:27 UTC 
(rev 20932)
@@ -20,7 +20,6 @@
             .getLogger(Construct.class);
 
 
-
     private static HashMap<Class<? extends Message>, Parser> parserCache = new 
HashMap<Class<? extends Message>, Parser>(100);
 
     /**
@@ -230,7 +229,7 @@
             parser = new StringParser(zts.charset(), zts.optional(), field);
         }
 
-        public void visit(Nested n) {
+        public void visit(NestedMessage n) {
 
             Class<? extends Message> ct;
             //noinspection unchecked

Deleted: gnunet-java/src/org/gnunet/construct/Fill.java
===================================================================
--- gnunet-java/src/org/gnunet/construct/Fill.java      2012-04-10 20:56:54 UTC 
(rev 20931)
+++ gnunet-java/src/org/gnunet/construct/Fill.java      2012-04-10 23:08:27 UTC 
(rev 20932)
@@ -1,17 +0,0 @@
-package org.gnunet.construct;
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-/**
- * An array of messages filling the rest of the frame
- * 
- * @author Florian Dold
- * 
- */
address@hidden(RetentionPolicy.RUNTIME)
address@hidden(ElementType.FIELD)
-public @interface Fill {
-}

Copied: gnunet-java/src/org/gnunet/construct/FillWith.java (from rev 20910, 
gnunet-java/src/org/gnunet/construct/Fill.java)
===================================================================
--- gnunet-java/src/org/gnunet/construct/FillWith.java                          
(rev 0)
+++ gnunet-java/src/org/gnunet/construct/FillWith.java  2012-04-10 23:08:27 UTC 
(rev 20932)
@@ -0,0 +1,17 @@
+package org.gnunet.construct;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * An array of messages filling the rest of the frame
+ * 
+ * @author Florian Dold
+ * 
+ */
address@hidden(RetentionPolicy.RUNTIME)
address@hidden(ElementType.FIELD)
+public @interface FillWith {
+}

Deleted: gnunet-java/src/org/gnunet/construct/MessageHeader.java
===================================================================
--- gnunet-java/src/org/gnunet/construct/MessageHeader.java     2012-04-10 
20:56:54 UTC (rev 20931)
+++ gnunet-java/src/org/gnunet/construct/MessageHeader.java     2012-04-10 
23:08:27 UTC (rev 20932)
@@ -1,13 +0,0 @@
-package org.gnunet.construct;
-
-public class MessageHeader implements Message {
-
-    @FrameSize
-    @UInt16
-    public int messageSize;
-
-    @UInt16
-    public int messageType;
-
-    public static final int SIZE = 4;
-}

Deleted: gnunet-java/src/org/gnunet/construct/Nested.java
===================================================================
--- gnunet-java/src/org/gnunet/construct/Nested.java    2012-04-10 20:56:54 UTC 
(rev 20931)
+++ gnunet-java/src/org/gnunet/construct/Nested.java    2012-04-10 23:08:27 UTC 
(rev 20932)
@@ -1,19 +0,0 @@
-package org.gnunet.construct;
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-/**
- * Embed another constructable message.
- * 
- * @author Florian Dold
- * 
- */
address@hidden(RetentionPolicy.RUNTIME)
address@hidden(ElementType.FIELD)
-public @interface Nested {
-    boolean newFrame() default false;
-    boolean optional() default false;
-}
\ No newline at end of file

Copied: gnunet-java/src/org/gnunet/construct/NestedMessage.java (from rev 
20910, gnunet-java/src/org/gnunet/construct/Nested.java)
===================================================================
--- gnunet-java/src/org/gnunet/construct/NestedMessage.java                     
        (rev 0)
+++ gnunet-java/src/org/gnunet/construct/NestedMessage.java     2012-04-10 
23:08:27 UTC (rev 20932)
@@ -0,0 +1,19 @@
+package org.gnunet.construct;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * Embed another constructable message.
+ * 
+ * @author Florian Dold
+ * 
+ */
address@hidden(RetentionPolicy.RUNTIME)
address@hidden(ElementType.FIELD)
+public @interface NestedMessage {
+    boolean newFrame() default false;
+    boolean optional() default false;
+}
\ No newline at end of file

Added: gnunet-java/src/org/gnunet/construct/parsers/FillIntegerParser.java
===================================================================
--- gnunet-java/src/org/gnunet/construct/parsers/FillIntegerParser.java         
                (rev 0)
+++ gnunet-java/src/org/gnunet/construct/parsers/FillIntegerParser.java 
2012-04-10 23:08:27 UTC (rev 20932)
@@ -0,0 +1,48 @@
+package org.gnunet.construct.parsers;
+
+
+import org.gnunet.construct.Message;
+import org.gnunet.construct.ReflectUtil;
+
+import java.lang.reflect.Array;
+import java.lang.reflect.Field;
+import java.nio.ByteBuffer;
+import java.util.List;
+
+public class FillIntegerParser implements Parser {
+    private final Field targetField;
+    private final boolean isSigned;
+    private final int byteSize;
+
+    private final List<Field> totalSizePath;
+    private final ReflectUtil.NumField totalSizeField;
+
+    public FillIntegerParser(Field targetField, List<Field> totalSizePath,  
boolean isSigned, int byteSize) {
+        this.targetField = targetField;
+        this.isSigned = isSigned;
+        this.byteSize = byteSize;
+
+        this.totalSizePath = totalSizePath;
+        totalSizeField = new 
ReflectUtil.NumField(totalSizePath.get(totalSizePath.size() - 1));
+    }
+
+    @Override
+    public int getSize(Message srcObj) {
+        return byteSize * Array.getLength(ReflectUtil.justGet(srcObj, 
targetField));
+    }
+
+    @Override
+    public int parse(ByteBuffer srcBuf, int frameStart, Message frameObj, 
Message dstObj) {
+        return 0;
+    }
+
+    @Override
+    public int write(ByteBuffer dstBuf, Message srcObj) {
+        return 0;
+    }
+
+    @Override
+    public void patch(Message m, int frameSize, Message frameObj) {
+        totalSizeField.set(ReflectUtil.followFieldPathToParent(totalSizePath, 
m), frameSize);
+    }
+}

Modified: gnunet-java/src/org/gnunet/construct/parsers/IntegerParser.java
===================================================================
--- gnunet-java/src/org/gnunet/construct/parsers/IntegerParser.java     
2012-04-10 20:56:54 UTC (rev 20931)
+++ gnunet-java/src/org/gnunet/construct/parsers/IntegerParser.java     
2012-04-10 23:08:27 UTC (rev 20932)
@@ -4,9 +4,12 @@
 import org.gnunet.construct.ReflectUtil;
 
 import java.lang.reflect.Field;
-import java.math.BigInteger;
 import java.nio.ByteBuffer;
 
+/**
+ *
+ * todo: error checking on numeric overflow
+ */
 public class IntegerParser implements Parser {
 
     public static final boolean UNSIGNED = false;
@@ -35,9 +38,9 @@
     @Override
     public int parse(final ByteBuffer srcBuf, int frameOffset, Message 
frameObj, final Message dstObj) {
         if (targetField.isBig()) {
-            targetField.set(dstObj, readBigInteger(srcBuf));
+            targetField.set(dstObj, IntegerUtil.readBigInteger(srcBuf, 
isSigned, byteSize));
         } else {
-            targetField.set(dstObj, readLong(srcBuf));
+            targetField.set(dstObj, IntegerUtil.readLong(srcBuf, isSigned, 
byteSize));
         }
         return byteSize;
     }
@@ -45,91 +48,16 @@
     @Override
     public int write(final ByteBuffer dstBuf, final Message srcObj) {
         if (targetField.isBig()) {
-            writeBitInteger(targetField.getBig(srcObj), dstBuf);
+            IntegerUtil.writeBitInteger(targetField.getBig(srcObj), dstBuf, 
isSigned, byteSize);
         } else {
             // todo: error checking on numeric overflow, if requested
-            writeLong(targetField.get(srcObj), dstBuf);
+            IntegerUtil.writeLong(targetField.get(srcObj), dstBuf, isSigned, 
byteSize);
         }
         return byteSize;
     }
 
-
-
     @Override
     public void patch(Message m, int frameSize, Message frameObj) {
         // nothing to do
     }
-
-
-    public void writeLong(final long val, final ByteBuffer dstBuf) {
-
-        long myval = val;
-
-        //DBG
-        int startPos = dstBuf.position();
-
-
-        // position of the last byte we are responsible to write
-        int last = dstBuf.position() + byteSize - 1;
-
-        while (last >= dstBuf.position()) {
-            dstBuf.put(last, (byte) (myval & 0xFF));
-            myval >>>= 8;
-            last -= 1;
-        }
-
-        if (isSigned) {
-            // a long has 8 bytes, shift by 7 bytes (non-arithmetically) to 
get the sign
-            byte sign = (byte) ((val >>> (7*8)) & 0x80);
-            // remove the sign bit from the buffer
-            dstBuf.put(dstBuf.position() + byteSize - 1, (byte) 
(dstBuf.get(dstBuf.position() + byteSize - 1) & ~sign));
-            // ... and put it in the right place (lowest byte)
-            dstBuf.put(dstBuf.position(), (byte) 
(dstBuf.get(dstBuf.position()) | sign));
-
-        }
-
-        dstBuf.position(dstBuf.position() + byteSize);
-    }
-
-    private void writeBitInteger(BigInteger big, ByteBuffer dstBuf) {
-        throw new UnsupportedOperationException("not yet implemented");
-    }
-
-    public long readLong(ByteBuffer srcBuf) {
-        long val = 0;
-        
-        final int first = srcBuf.position();
-        final int last = first + byteSize - 1;
-
-        // read all bytes except the last
-        while (srcBuf.position() != last) {
-            byte b = srcBuf.get();
-            // byte b may be signed, if so interpret it as unsigned byte; 
store it in an int
-            int s = b >= 0 ? b : (256 + b);
-
-            val |= s;
-            val <<= 8;
-        }
-
-        // read the last byte, we don't have to shift val after that
-        byte b = srcBuf.get();
-        int s = b >= 0 ? b : (256 + b);
-        val |= s;
-
-        if (isSigned) {
-            // explicitly OR sign bit to the right place if the source buffer 
is
-            // too large
-            long sign = (srcBuf.get(first) & 0x80);
-            val |= (sign << 7);
-        }
-
-
-        return val;
-    }
-
-
-    public BigInteger readBigInteger(final ByteBuffer srcBuf) {
-        throw new UnsupportedOperationException("not yet implemented");
-    }
-
 }

Added: gnunet-java/src/org/gnunet/construct/parsers/IntegerUtil.java
===================================================================
--- gnunet-java/src/org/gnunet/construct/parsers/IntegerUtil.java               
                (rev 0)
+++ gnunet-java/src/org/gnunet/construct/parsers/IntegerUtil.java       
2012-04-10 23:08:27 UTC (rev 20932)
@@ -0,0 +1,75 @@
+package org.gnunet.construct.parsers;
+
+
+import java.math.BigInteger;
+import java.nio.ByteBuffer;
+
+public class IntegerUtil {
+    public static long readLong(ByteBuffer srcBuf, boolean isSigned, int 
byteSize) {
+        long val = 0;
+
+        final int first = srcBuf.position();
+        final int last = first + byteSize - 1;
+
+        // read all bytes except the last
+        while (srcBuf.position() != last) {
+            byte b = srcBuf.get();
+            // byte b may be signed, if so interpret it as unsigned byte; 
store it in an int
+            int s = b >= 0 ? b : (256 + b);
+
+            val |= s;
+            val <<= 8;
+        }
+
+        // read the last byte, we don't have to shift val after that
+        byte b = srcBuf.get();
+        int s = b >= 0 ? b : (256 + b);
+        val |= s;
+
+        if (isSigned) {
+            // explicitly OR sign bit to the right place if the source buffer 
is
+            // too large
+            long sign = (srcBuf.get(first) & 0x80);
+            val |= (sign << 7);
+        }
+
+        return val;
+    }
+
+    public static void writeLong(final long val, final ByteBuffer dstBuf, 
boolean isSigned, int byteSize) {
+        long myval = val;
+
+        int startPos = dstBuf.position();
+
+
+        // position of the last byte we are responsible to write
+        int last = dstBuf.position() + byteSize - 1;
+
+        while (last >= dstBuf.position()) {
+            dstBuf.put(last, (byte) (myval & 0xFF));
+            myval >>>= 8;
+            last -= 1;
+        }
+
+        if (isSigned) {
+            // a long has 8 bytes, shift by 7 bytes (non-arithmetically) to 
get the sign
+            byte sign = (byte) ((val >>> (7*8)) & 0x80);
+            // remove the sign bit from the buffer
+            dstBuf.put(dstBuf.position() + byteSize - 1, (byte) 
(dstBuf.get(dstBuf.position() + byteSize - 1) & ~sign));
+            // ... and put it in the right place (lowest byte)
+            dstBuf.put(dstBuf.position(), (byte) 
(dstBuf.get(dstBuf.position()) | sign));
+
+        }
+
+        dstBuf.position(dstBuf.position() + byteSize);
+    }
+
+
+    public static void writeBitInteger(BigInteger big, ByteBuffer dstBuf, 
boolean isSigned, int byteSize) {
+        throw new UnsupportedOperationException("not yet implemented");
+    }
+
+    public static BigInteger readBigInteger(final ByteBuffer srcBuf, boolean 
isSigned, int byteSize) {
+        throw new UnsupportedOperationException("not yet implemented");
+    }
+}

Modified: gnunet-java/src/org/gnunet/core/Core.java
===================================================================
--- gnunet-java/src/org/gnunet/core/Core.java   2012-04-10 20:56:54 UTC (rev 
20931)
+++ gnunet-java/src/org/gnunet/core/Core.java   2012-04-10 23:08:27 UTC (rev 
20932)
@@ -1,20 +1,277 @@
 package org.gnunet.core;
 
-import org.gnunet.util.Cancelable;
-import org.gnunet.util.Configuration;
+import org.gnunet.construct.*;
+import org.gnunet.util.*;
+import org.grothoff.Runabout;
 
 public class Core {
 
-    public interface CoreCallback {
+    enum CoreOption {
+        NOTHING(0),
+        SEND_FULL_INBOUND(8),
+        SEND_HDR_INBOUND(16),
+        SEND_FULL_OUTBOUND(32),
+        SEND_HDR_OUTBOUND(64);
 
+        public final int val;
+
+        CoreOption(int val) {
+            this.val = val;
+        }
     }
 
-    public Core(Configuration cfg, int queueSize, boolean inboundHeaderOnly, 
boolean outboundHeaderOnly,
-                CoreCallback cb) {
 
+    @UnionCase(64)
+    public static class InitMessage implements GnunetMessage.Body {
+        @UInt32
+        public long options;
+
+        @FillWith
+        @UInt16
+        public int[] interested;
     }
 
-    public Cancelable notifyTransmitReady() {
+    @UnionCase(65)
+    public static class InitReplyMessage implements GnunetMessage.Body {
+        @UInt32
+        public int reserved = 0;
+        /**
+         * pubkey of the local peer
+         */
+        @NestedMessage
+        public PeerIdentity myIdentity;
+    }
+
+
+    public static class NotifyInboundTrafficMessage implements 
GnunetMessage.Body {
+        /**
+         * Number of ATS key-value pairs that follow this struct
+         * (excluding the 0-terminator).
+         */
+        @UInt32
+        long ats_count;
+
+        /**
+         * Identity of the receiver or sender.
+         */
+        @NestedMessage
+        public PeerIdentity peer;
+
+        /**
+         * First of the ATS information blocks (we must have at least
+         * one due to the 0-termination requirement).
+         */
+        @NestedMessage
+        public ATSInformation atsInformation;
+    }
+
+
+    /**
+     * Message sent by the service to clients to notify them
+     * about a peer connecting.
+     */
+    @UnionCase(67)
+    public static class ConnectNotifyMessage implements GnunetMessage.Body {
+        /**
+         * Number of ATS key-value pairs that follow this struct
+         * (excluding the 0-terminator).
+         */
+        @UInt32
+        public long atsCount;
+
+        /**
+         * Identity of the connecting peer.
+         */
+        @NestedMessage
+        public PeerIdentity peer;
+
+        @FillWith
+        @NestedMessage
+        public ATSInformation atsInformation;
+
+    }
+
+    /**
+     * Message sent by the service to clients to notify them
+     * about a peer disconnecting.
+     */
+    @UnionCase(68)
+    public static class DisconnectNotifyMessage implements GnunetMessage.Body {
+        /**
+         * Always zero.
+         */
+        @UInt32
+        public int reserved;
+
+        /**
+         * Identity of the connecting peer.
+         */
+        @NestedMessage
+        public PeerIdentity peer;
+    }
+
+
+    /**
+     * Client notifying core about the maximum-priority
+     * message it has in the queue for a particular target.
+     */
+    @UnionCase(74)
+    public static class SendMessageRequest implements GnunetMessage.Body {
+        /**
+         * How important is this message?
+         */
+        @UInt32
+        public long priority;
+
+        /**
+         * By what time would the sender really like to see this
+         * message transmitted?
+         */
+        @NestedMessage
+        public AbsoluteTimeMessage deadline;
+
+        /**
+         * Identity of the intended target.
+         */
+        @NestedMessage
+        public PeerIdentity peer;
+
+        /**
+         * How large is the client's message queue for this peer?
+         */
+        @UInt32
+        public long queueSize;
+
+        /**
+         * How large is the message?
+         */
+        @UInt16
+        public int size;
+
+        /**
+         * Counter for this peer to match SMRs to replies.
+         */
+        @UInt16
+        public int smrId;
+    }
+
+    /**
+     * Core notifying client that it is allowed to now
+     * transmit a message to the given target
+     * (response to GNUNET_MESSAGE_TYPE_CORE_SEND_REQUEST).
+     */
+    @UnionCase(75)
+    public static class SendMessageReady implements GnunetMessage.Body {
+        /**
+         * How many bytes are allowed for transmission?
+         * Guaranteed to be at least as big as the requested size,
+         * or ZERO if the request is rejected (will timeout,
+         * peer disconnected, queue full, etc.).
+         */
+        @UInt16
+        public int size;
+
+        /**
+         * smr_id from the request.
+         */
+        @UInt16
+        public int smr_id;
+
+        /**
+         * Identity of the intended target.
+         */
+        @NestedMessage
+        public PeerIdentity peer;
+    }
+
+    /**
+     * Client asking core to transmit a particular message to a particular
+     * target (response to GNUNET_MESSAGE_TYPE_CORE_SEND_READY).
+     */
+    @UnionCase(76)
+    public static class SendMessage implements GnunetMessage.Body {
+        /**
+         * How important is this message?
+         */
+        @UInt32
+        public long priority;
+
+        /**
+         * By what time would the sender really like to see this
+         * message transmitted?
+         */
+        @NestedMessage
+        public AbsoluteTime deadline;
+
+        /**
+         * Identity of the intended receiver.
+         */
+        @NestedMessage
+        public PeerIdentity peer;
+
+        /**
+         * GNUNET_YES if corking is allowed, GNUNET_NO if not.
+         */
+        @UInt32
+        public int cork;
+
+        /**
+         * Always 0.
+         */
+        @UInt64
+        public int reserved;
+
+    }
+
+    public interface MessageHandler {
+
+    }
+
+    public interface Continuation {
+
+    }
+
+    public interface Init {
+        void onInit(PeerIdentity myIdentity);
+    }
+
+    private final Client client;
+
+    /**
+     * Receive messages that have a visit method in messageHandler.
+     *
+     * @param cfg configuration to use
+     * @param init callback, called after handshake with core. called with 
identity of the local peer.
+     * @param init Called after handshake with the core service failed or 
succeeded.
+     *             Guaranteed to be called only after the constructur returns.
+     */
+    public Core(Configuration cfg, Init init, MessageHandler[] handlers) {
+        client = new Client("core", cfg);
+
+        InitMessage initMessage = new InitMessage();
+
+        // ...
+
+        client.transmitAndGetResponse(initMessage, RelativeTime.FOREVER, );
+    }
+
+    public Cancelable notifyTransmitReady(boolean cork, long priority, 
RelativeTime maxdelay,
+                                          PeerIdentity target, int size, 
MessageTransmitter transmitter) {
         return null;
     }
+
+    public Cancelable transmitMessage(GnunetMessage.Body messageBody, 
RelativeTime timeout,
+                                      PeerIdentity target, Continuation cont) {
+
+    }
+
+    /**
+     * Disconnect from the core service.    This function can only
+     * be called *after* all pending notifyTransmitReady
+     * requests have been explicitly cancelled.
+     */
+
+    public void disconnect() {
+
+    }
 }

Modified: gnunet-java/src/org/gnunet/dht/DistributedHashTable.java
===================================================================
--- gnunet-java/src/org/gnunet/dht/DistributedHashTable.java    2012-04-10 
20:56:54 UTC (rev 20931)
+++ gnunet-java/src/org/gnunet/dht/DistributedHashTable.java    2012-04-10 
23:08:27 UTC (rev 20932)
@@ -116,8 +116,8 @@
         public int desiredReplicationLevel;
         @UInt32
         public int type;
-        @Nested
-        public HashCodeMessage key;
+        @NestedMessage
+        public HashCode key;
         @UInt64
         public long uniqueId;
         @ByteFill
@@ -138,10 +138,10 @@
         public int options;
         @UInt32
         public int desiredReplicationLevel;
-        @Nested
+        @NestedMessage
         public AbsoluteTimeMessage expiration;
-        @Nested
-        public HashCodeMessage hash;
+        @NestedMessage
+        public HashCode hash;
         @ByteFill
         public byte[] data;
     }
@@ -152,8 +152,8 @@
         public int reserved = 0;
         @UInt64
         public long unique_id;
-        @Nested
-        public HashCodeMessage key;
+        @NestedMessage
+        public HashCode key;
     }
 
     @UnionCase(145)
@@ -166,14 +166,14 @@
         public int getPathLength;
         @UInt64
         public long uid;
-        @Nested
+        @NestedMessage
         public AbsoluteTimeMessage expiration;
-        @Nested
-        public HashCodeMessage key;
+        @NestedMessage
+        public HashCode key;
         @VariableSizeArray(lengthField = "putPathLength")
-        public PeerIdentityMessage[] putPath;
+        public PeerIdentity[] putPath;
         @VariableSizeArray(lengthField = "getPathLength")
-        public PeerIdentityMessage[] getPath;
+        public PeerIdentity[] getPath;
         @ByteFill
         public byte[] data;
     }
@@ -224,7 +224,7 @@
                     RelativeTime timeout, final Continuation cont) {
         final DHTClientPutMessage cpm = new DHTClientPutMessage();
         cpm.data = data;
-        cpm.hash = key.asMessage();
+        cpm.hash = key;
         cpm.desiredReplicationLevel = replicationLevel;
         cpm.expiration = expiration.asMessage();
         cpm.type = type.val;
@@ -274,7 +274,7 @@
                 @Override
                 public void transmit(Client.MessageSink sink) {
                     final DHTClientGetStopMessage sm = new 
DHTClientGetStopMessage();
-                    sm.key = key.asMessage();
+                    sm.key = key;
                     sm.unique_id = uid;
                     sink.send(sm);
                 }
@@ -308,8 +308,7 @@
             if (request == null) {
                 logger.warn("received response on invalid UID");
             } else {
-                
request.cb.handleResult(AbsoluteTime.fromNetwork(rm.expiration),
-                        HashCode.fromMessage(rm.key), null, null, 
BlockType.TEST, rm.data);
+                
request.cb.handleResult(AbsoluteTime.fromNetwork(rm.expiration), rm.key, null, 
null, BlockType.TEST, rm.data);
             }
 
             if (!activeRequests.isEmpty()) {
@@ -335,7 +334,7 @@
 
         final DHTClientGetMessage getMessage = new DHTClientGetMessage();
         getMessage.desiredReplicationLevel = replication;
-        getMessage.key = key.asMessage();
+        getMessage.key = key;
         getMessage.options = routeOptions;
         getMessage.xquery = xquery;
         getMessage.type = type.val;

Modified: gnunet-java/src/org/gnunet/nse/NetworkSizeEstimation.java
===================================================================
--- gnunet-java/src/org/gnunet/nse/NetworkSizeEstimation.java   2012-04-10 
20:56:54 UTC (rev 20931)
+++ gnunet-java/src/org/gnunet/nse/NetworkSizeEstimation.java   2012-04-10 
23:08:27 UTC (rev 20932)
@@ -39,7 +39,7 @@
         @UInt32
         public int reserved;
 
-        @Nested
+        @NestedMessage
         public AbsoluteTimeMessage timestamp;
 
         @Double

Modified: gnunet-java/src/org/gnunet/statistics/Statistics.java
===================================================================
--- gnunet-java/src/org/gnunet/statistics/Statistics.java       2012-04-10 
20:56:54 UTC (rev 20931)
+++ gnunet-java/src/org/gnunet/statistics/Statistics.java       2012-04-10 
23:08:27 UTC (rev 20932)
@@ -42,9 +42,7 @@
 
     @UnionCase(171)
     public static class ResponseEndMessage implements GnunetMessage.Body {
-        public static final int MSG_ID = 171;
-        @Nested
-        public MessageHeader header;
+        // empty
     }
 
     @UnionCase(168)

Added: gnunet-java/src/org/gnunet/util/ATSInformation.java
===================================================================
--- gnunet-java/src/org/gnunet/util/ATSInformation.java                         
(rev 0)
+++ gnunet-java/src/org/gnunet/util/ATSInformation.java 2012-04-10 23:08:27 UTC 
(rev 20932)
@@ -0,0 +1,13 @@
+package org.gnunet.util;
+
+
+import org.gnunet.construct.Message;
+import org.gnunet.construct.UInt32;
+
+public class ATSInformation implements Message {
+    @UInt32
+    public long type;
+
+    @UInt32
+    public long value;
+}

Modified: gnunet-java/src/org/gnunet/util/Client.java
===================================================================
--- gnunet-java/src/org/gnunet/util/Client.java 2012-04-10 20:56:54 UTC (rev 
20931)
+++ gnunet-java/src/org/gnunet/util/Client.java 2012-04-10 23:08:27 UTC (rev 
20932)
@@ -54,7 +54,6 @@
     private String connectionHost;
     private int connectionPort;
 
-
     /**
      * The list of possible IP addresses the service can be reached by.
      */
@@ -69,12 +68,14 @@
 
     /**
      * Initial value for connectBackoff.
+     *
      * @see Client.connectBackoff
      */
     private final RelativeTime INITAL_BACKOFF = new RelativeTime(5);
 
     /**
      * Maximum value for connectBackoff.
+     *
      * @see Client.connectBackoff
      */
     private final RelativeTime MAX_BACKOFF = RelativeTime.SECOND.multiply(5);
@@ -98,7 +99,7 @@
      * Initially, this buffer has the size of the smallest possible messages, 
but grows when
      * receiving larger messages.
      */
-    private ByteBuffer recvBuffer = ByteBuffer.allocate(MessageHeader.SIZE);
+    private ByteBuffer recvBuffer = 
ByteBuffer.allocate(GnunetMessage.Header.SIZE);
 
 
     /**
@@ -119,7 +120,7 @@
      * Initially, this buffer has the size of the smallest possible messages, 
but grows when
      * transmitting larger messages.
      */
-    private ByteBuffer transmitBuffer = 
ByteBuffer.allocate(MessageHeader.SIZE);
+    private ByteBuffer transmitBuffer = 
ByteBuffer.allocate(GnunetMessage.Header.SIZE);
 
 
     /**
@@ -143,14 +144,14 @@
 
 
     /**
-     * A ReceiveHelper is responsible for receiving a whole
-     * gnunet message and call the respective MessageReceiver with the message 
on success,
+     * The ReceiveHelper is responsible for receiving a whole
+     * GnunetMessage and call the respective MessageReceiver with the message 
on success,
      * and null on failure or timeout.
      */
     private class ReceiveHelper implements Task {
         private MessageReceiver receiver;
         private RelativeTime timeout;
-        private MessageHeader msgh = null;
+        private GnunetMessage.Header msgh = null;
         private Scheduler.TaskIdentifier recvTask = null;
         private boolean finished = false;
         // is this receiver actively working? if not, the connection process 
has to kick off the receiver
@@ -167,10 +168,10 @@
             currentReceiveHelper = null;
             finished = true;
             logger.debug("dispatching message with " + recvBuffer.position() + 
" bytes");
-            recvBuffer.flip(); 
-            
+            recvBuffer.flip();
+
             GnunetMessage msg = Construct.parseAs(recvBuffer, 
GnunetMessage.class);
-            
+
             receiver.process(msg.body);
         }
 
@@ -208,8 +209,8 @@
                         dispatchMessage();
                     } else {
                         recvBuffer.rewind();
-                        msgh = Construct.parseAs(recvBuffer, 
MessageHeader.class);
-                        if (msgh.messageSize > MessageHeader.SIZE) {
+                        msgh = Construct.parseAs(recvBuffer, 
GnunetMessage.Header.class);
+                        if (msgh.messageSize > GnunetMessage.Header.SIZE) {
                             if (recvBuffer.capacity() < msgh.messageSize) {
                                 ByteBuffer buf = 
ByteBuffer.allocate(msgh.messageSize);
                                 recvBuffer.flip();
@@ -323,7 +324,7 @@
         private void schedule() {
             // timeout is forever, because there is no way to directly limit 
the transmission time
             // of a message, only the max. wait time before transmission.
-            // cancel must be ca        lled on the transmitTask if we 
disconnect
+            // cancel must be called on the transmitTask if we disconnect
             Scheduler.TaskBuilder b = new Scheduler.TaskBuilder();
             
b.withTimeout(RelativeTime.FOREVER).withSelectWrite(chan).withTask(this);
             this.transmitTask = Scheduler.add(b);
@@ -354,7 +355,7 @@
     }
 
     /**
-     * Get a connection with a service.
+     * Create a connection to a service.
      *
      * @param serviceName name of the service
      * @param cfg         configuration to use
@@ -406,7 +407,8 @@
         if (resolveHandle != null) {
             return;
         }
-        resolveHandle = Resolver.getInstance().resolveHostname(connectionHost, 
RelativeTime.FOREVER, new AddressHandler());
+        resolveHandle = Resolver.getInstance().resolveHostname(connectionHost, 
RelativeTime.FOREVER,
+                new AddressHandler());
     }
 
     private void connectDelayed() {
@@ -426,8 +428,8 @@
     private void increaseBackoff() {
         connectBackoff = RelativeTime.min(connectBackoff.multiply(2), new 
RelativeTime(5000));
     }
-    
 
+
     private void connectNextAddress() {
         if (addressList.isEmpty()) {
             initiateResolve();
@@ -497,6 +499,10 @@
         connectNextAddress();
     }
 
+    public boolean isConnected() {
+        return chan != null && chan.isConnected();
+    }
+
     /**
      * Cancel all pending receive requests. Reconnect to the service if not 
already connected.
      */
@@ -529,10 +535,10 @@
         logger.debug("scheduling receive with timeout " + timeout);
 
         recvBuffer.clear();
-        recvBuffer.limit(MessageHeader.SIZE);
+        recvBuffer.limit(GnunetMessage.Header.SIZE);
         final ReceiveHelper rh = new ReceiveHelper(receiver, timeout);
         currentReceiveHelper = rh;
-        
+
         if (chan.isConnected()) {
             currentReceiveHelper.schedule();
         }
@@ -580,7 +586,6 @@
         logger.debug("notifyTransmitReady with timeout {}", timeout);
 
 
-
         final TransmitHelper transmit = new TransmitHelper(transmitter, 
timeout, autoRetry);
 
         if (currentTransmitHelper == null) {
@@ -602,6 +607,28 @@
 
 
     /**
+     * Send a message to the service and wait for a reply from the service.
+     */
+    public void transmitAndGetResponse(final GnunetMessage.Body message, final 
RelativeTime timeout,
+                                       final boolean autoRetry,
+                                       final MessageReceiver receiver) {
+        notifyTransmitReady(timeout, autoRetry, new MessageTransmitter() {
+            @Override
+            public void transmit(MessageSink sink) {
+                sink.send(message);
+                receive(timeout, receiver);
+            }
+
+            @Override
+            public void handleError(TransmitError error) {
+                receiver.handleError(null);
+            }
+        });
+
+    }
+
+
+    /**
      * Disconnect from the service. Cancel all pending recveive/transmit 
requests.
      */
     public void disconnect() {
@@ -610,7 +637,7 @@
 
     /**
      * Disconnect from the service. Cancel all pending receive requests.
-     *
+     * <p/>
      * If finishPendingRewrites is true, the client will only disconnect
      * after the data in the transmit buffer has been transmitted.
      *

Modified: gnunet-java/src/org/gnunet/util/GnunetMessage.java
===================================================================
--- gnunet-java/src/org/gnunet/util/GnunetMessage.java  2012-04-10 20:56:54 UTC 
(rev 20931)
+++ gnunet-java/src/org/gnunet/util/GnunetMessage.java  2012-04-10 23:08:27 UTC 
(rev 20932)
@@ -6,7 +6,7 @@
 public final class GnunetMessage implements Message {
     public final int MINIMAL_SIZE = Header.SIZE;
 
-    public static final class Header implements Message{
+    public static final class Header implements Message {
         public static final int SIZE = 4;
 
         @FrameSize
@@ -28,7 +28,7 @@
         return msg;
     }
 
-    @Nested
+    @NestedMessage
     public Header header;
 
     @Union(tag = "header.messageType")

Modified: gnunet-java/src/org/gnunet/util/HashCode.java
===================================================================
--- gnunet-java/src/org/gnunet/util/HashCode.java       2012-04-10 20:56:54 UTC 
(rev 20931)
+++ gnunet-java/src/org/gnunet/util/HashCode.java       2012-04-10 23:08:27 UTC 
(rev 20932)
@@ -1,12 +1,16 @@
 package org.gnunet.util;
 
 
+import org.gnunet.construct.FixedSizeByteArray;
+import org.gnunet.construct.Message;
 import org.gnunet.exceptions.InterfaceViolationException;
 
 import java.security.MessageDigest;
 import java.security.NoSuchAlgorithmException;
 
-public class HashCode {
+public class HashCode implements Message {
+
+    @FixedSizeByteArray(length = 64)
     private final byte[] data;
 
     public HashCode(byte[] hash) {
@@ -33,16 +37,4 @@
         }
         this.data = data;
     }
-
-    public static HashCode fromMessage(HashCodeMessage m) {
-        return new HashCode(m.data);
-    }
-
-
-    public HashCodeMessage asMessage() {
-        HashCodeMessage hcm = new HashCodeMessage();
-        hcm.data = data;
-        return hcm;
-    }
-
 }
\ No newline at end of file

Deleted: gnunet-java/src/org/gnunet/util/HashCodeMessage.java
===================================================================
--- gnunet-java/src/org/gnunet/util/HashCodeMessage.java        2012-04-10 
20:56:54 UTC (rev 20931)
+++ gnunet-java/src/org/gnunet/util/HashCodeMessage.java        2012-04-10 
23:08:27 UTC (rev 20932)
@@ -1,9 +0,0 @@
-package org.gnunet.util;
-
-import org.gnunet.construct.FixedSizeByteArray;
-import org.gnunet.construct.Message;
-
-public class HashCodeMessage implements Message {
-    @FixedSizeByteArray(length = 64)
-    public byte[] data;
-}

Modified: gnunet-java/src/org/gnunet/util/PeerIdentity.java
===================================================================
--- gnunet-java/src/org/gnunet/util/PeerIdentity.java   2012-04-10 20:56:54 UTC 
(rev 20931)
+++ gnunet-java/src/org/gnunet/util/PeerIdentity.java   2012-04-10 23:08:27 UTC 
(rev 20932)
@@ -1,6 +1,11 @@
 package org.gnunet.util;
 
 
-public class PeerIdentity {
+import org.gnunet.construct.FixedSizeByteArray;
+import org.gnunet.construct.Message;
 
+public class PeerIdentity implements Message {
+
+    @FixedSizeByteArray(length = 64)
+    public byte[] data;
 }

Deleted: gnunet-java/src/org/gnunet/util/PeerIdentityMessage.java
===================================================================
--- gnunet-java/src/org/gnunet/util/PeerIdentityMessage.java    2012-04-10 
20:56:54 UTC (rev 20931)
+++ gnunet-java/src/org/gnunet/util/PeerIdentityMessage.java    2012-04-10 
23:08:27 UTC (rev 20932)
@@ -1,9 +0,0 @@
-package org.gnunet.util;
-
-import org.gnunet.construct.FixedSizeByteArray;
-import org.gnunet.construct.Message;
-
-public class PeerIdentityMessage implements Message {
-    @FixedSizeByteArray(length = 64)
-    public byte[] data;
-}

Modified: gnunet-java/src/org/gnunet/util/Resolver.java
===================================================================
--- gnunet-java/src/org/gnunet/util/Resolver.java       2012-04-10 20:56:54 UTC 
(rev 20931)
+++ gnunet-java/src/org/gnunet/util/Resolver.java       2012-04-10 23:08:27 UTC 
(rev 20932)
@@ -60,7 +60,7 @@
 
     @UnionCase(5)
     public static class ResolverResponse implements GnunetMessage.Body {
-        @Nested(optional = true)
+        @NestedMessage(optional = true)
         public ResponseBody responseBody;
     }
 

Modified: gnunet-java/src/org/gnunet/util/Server.java
===================================================================
--- gnunet-java/src/org/gnunet/util/Server.java 2012-04-10 20:56:54 UTC (rev 
20931)
+++ gnunet-java/src/org/gnunet/util/Server.java 2012-04-10 23:08:27 UTC (rev 
20932)
@@ -1,11 +1,91 @@
 package org.gnunet.util;
 
 
+import org.grothoff.Runabout;
+
+import java.io.IOException;
+import java.net.SocketAddress;
+import java.nio.channels.ServerSocketChannel;
+import java.util.ArrayList;
+import java.util.List;
+
 public class Server {
     public class ClientHandle {
-        // ...
+        public void notifyTransmitReady() {
+
+        }
+
+        public void persist() {
+
+        }
+
+        public void receiveDone() {
+
+        }
+
+        public void setTimeout(RelativeTime newTimeout) {
+
+        }
+
+        public void setFinishPendingWrites() {
+
+        }
+
+        public void disableReceiveDoneWarning() {
+
+        }
+
     }
-    public Server(String serviceName, Configuration cfg) {
-        
+
+
+    abstract class MessageHandler {
+
     }
+
+    abstract class MessageRunabout extends Runabout {
+        public ClientHandle getSender() {
+            return null;
+        }
+
+        private void setSender() {
+
+        }
+
+
+    }
+
+    List<ServerSocketChannel> sockets = new ArrayList<ServerSocketChannel>(2);
+
+    List<ClientHandle> clients;
+
+
+    public Server(SocketAddress[] addresses, RelativeTime idleTimeout, boolean 
requireFound) {
+        try {
+            ServerSocketChannel socket = ServerSocketChannel.open();
+        } catch (IOException e) {
+            e.printStackTrace();
+        }
+
+    }
+
+
+    // todo: do overloads / parameters wrt runabout
+    public void addHandler(MessageHandler cb) {
+
+    }
+
+    public void addHandler(MessageRunabout cb) {
+
+    }
+
+    /**
+     * Free resources held by this server.
+     */
+    public void destroy() {
+
+    }
+
+    public void injectMessage() {
+
+    }
 }

Modified: gnunet-java/src/org/gnunet/util/Service.java
===================================================================
--- gnunet-java/src/org/gnunet/util/Service.java        2012-04-10 20:56:54 UTC 
(rev 20931)
+++ gnunet-java/src/org/gnunet/util/Service.java        2012-04-10 23:08:27 UTC 
(rev 20932)
@@ -13,7 +13,6 @@
         
     }
 
-
     public final void start() {
         // ...
     }

Modified: gnunet-java/src/org/grothoff/Runabout.java
===================================================================
--- gnunet-java/src/org/grothoff/Runabout.java  2012-04-10 20:56:54 UTC (rev 
20931)
+++ gnunet-java/src/org/grothoff/Runabout.java  2012-04-10 23:08:27 UTC (rev 
20932)
@@ -10,7 +10,7 @@
  * You should have received a copy of the GNU General Public License along with
  * the Runabout; see the file COPYING. If not, write to the Free Software
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- * 
+ *
  * This software is also licensed under the Eclipse Public License v1.0 
  * available at http://www.eclipse.org/legal/epl-v10.html.
  *
@@ -34,7 +34,7 @@
  * visit. For each node in the object graph the Runabout invokes the most
  * appropriate visit method.
  * <p>
- * Using the Runabout typically involves subclassimg Runabout and adding a
+ * Using the Runabout typically involves subclassing Runabout and adding a
  * couple of visit methods. The Runabout provides a 'visitAppropriate' method
  * which will invoke the most appropriate visit method of the current Runabout
  * instance. If no visit method is applicable, visitAppropriate calls
@@ -60,7 +60,7 @@
  * </ul>
  * Otherwise the visitor will die with an IllegalAccessError during execution.
  * <p>
- * 
+ *
  * @version 5.0
  * @author Christian Grothoff
  */
@@ -98,7 +98,7 @@
     /**
      * Call the appropriate visit method. Use this method if you are visiting a
      * graph of objects (no primitives).
-     * 
+     *
      * @param o the object to visit
      */
     public void visitAppropriate(Object o) {
@@ -109,7 +109,7 @@
      * Obtain the appropriate code to call for class c. The method either
      * obtains the code quickly from the code map (fast path) or by calling the
      * lookup method getAppropriateCode.
-     * 
+     *
      * @return the code, never returns null
      */
     private Code getAppropriateCodeInternal(Class c) {
@@ -132,7 +132,7 @@
      * find an unambiguous visit method matching any interface transitively
      * implemented by c. If that does not exist either, null is returned. If
      * only an ambiguous visit method exists, an exception is raised.
-     * 
+     *
      * @param c the class for which to find the code
      * @return the code to run, or null if no code was found
      * @throws RunaboutException if the lookup would be ambiguous
@@ -176,7 +176,7 @@
     /**
      * Find the appropriate Code to call in the map. If no code is found, 
return
      * null.
-     * 
+     *
      * @param c the class for which to find the code
      * @param cl the class where to start looking from
      * @return the code to run, or null if no code was found
@@ -302,7 +302,7 @@
 
     /**
      * Get the class name in canonical form.
-     * 
+     *
      * @param cls the class, may not be primitive
      * @return the ovm name, following the convention of
      *         <code>java.util.Class.forName</code> according to the JavaDoc
@@ -337,7 +337,7 @@
      * The Runabout.Cache is essentially a per-class cache of the internal
      * constant state of a Runabout instance. It contains the generated code to
      * quicly invoke the appropriate visit methods.
-     * 
+     *
      * @author Christian Grothoff
      */
     static final class Cache {
@@ -386,7 +386,7 @@
          * same Loader must have a unique name, this method patches the 
bytecode
          * at the given offset, changing the next 8 characters to a unique Java
          * classname.
-         * 
+         *
          * @param byteCode the bytecode of the class which must describe a 
class
          *        of type 'Code'. The class must contain a sequence XXXXXXXX at
          *        offset xIdx where the classname is to be patched
@@ -451,7 +451,7 @@
     /**
      * Code is the generic interface that all generated classes implement. It 
is
      * used to quickly map a given class to the appropriate visit method.
-     * 
+     *
      * @author Christian Grothoff
      */
     public static abstract class Code {
@@ -465,7 +465,7 @@
     /**
      * Implementation of Code that is called if no visit method matches (calls
      * visitDefault).
-     * 
+     *
      * @author Christian Grothoff
      */
     static final class NoCode extends Code {
@@ -488,7 +488,7 @@
 
     /**
      * Generic Exception for problems in the Runabout.
-     * 
+     *
      * @author Christian Grothoff
      */
     public static final class RunaboutException extends RuntimeException {

Modified: gnunet-java/test/org/gnunet/construct/ByteFillMessage.java
===================================================================
--- gnunet-java/test/org/gnunet/construct/ByteFillMessage.java  2012-04-10 
20:56:54 UTC (rev 20931)
+++ gnunet-java/test/org/gnunet/construct/ByteFillMessage.java  2012-04-10 
23:08:27 UTC (rev 20932)
@@ -2,7 +2,7 @@
 
 
 public class ByteFillMessage implements Message {
-    @Nested
+    @NestedMessage
     public MessageHeader header;
     
     @UInt32

Modified: gnunet-java/test/org/gnunet/construct/QueryMessage.java
===================================================================
--- gnunet-java/test/org/gnunet/construct/QueryMessage.java     2012-04-10 
20:56:54 UTC (rev 20931)
+++ gnunet-java/test/org/gnunet/construct/QueryMessage.java     2012-04-10 
23:08:27 UTC (rev 20932)
@@ -2,7 +2,7 @@
 
 public class QueryMessage implements Message {
 
-    @Nested
+    @NestedMessage
     public MessageHeader header;
 
     @UInt8

Modified: gnunet-java/test/org/gnunet/construct/SimpleTestMessage.java
===================================================================
--- gnunet-java/test/org/gnunet/construct/SimpleTestMessage.java        
2012-04-10 20:56:54 UTC (rev 20931)
+++ gnunet-java/test/org/gnunet/construct/SimpleTestMessage.java        
2012-04-10 23:08:27 UTC (rev 20932)
@@ -8,7 +8,7 @@
     @UInt8
     public short v2;
 
-    @Nested
+    @NestedMessage
     public SimpleTestMessage2 mn;
     
     @FixedSizeArray(length=5)

Modified: gnunet-java/test/org/gnunet/construct/SizeTestMessage.java
===================================================================
--- gnunet-java/test/org/gnunet/construct/SizeTestMessage.java  2012-04-10 
20:56:54 UTC (rev 20931)
+++ gnunet-java/test/org/gnunet/construct/SizeTestMessage.java  2012-04-10 
23:08:27 UTC (rev 20932)
@@ -1,6 +1,5 @@
 package org.gnunet.construct;
 
address@hidden(987)
 public class SizeTestMessage implements Message {
 
     @FrameSize




reply via email to

[Prev in Thread] Current Thread [Next in Thread]