Skip to content

Commit 3fcf433

Browse files
committed
hop list is now accessible when iterating message from a channel.
1 parent d65eec0 commit 3fcf433

File tree

4 files changed

+8
-6
lines changed

4 files changed

+8
-6
lines changed

src/net/sharksystem/asap/ASAPChunk.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import java.io.IOException;
44
import java.util.Iterator;
5+
import java.util.List;
56

67
/**
78
* An ASAP chunk is a set of message with the same format, same uri and same era.
@@ -83,4 +84,8 @@ public interface ASAPChunk {
8384
* @see net.sharksystem.asap.ASAPPeer#sendASAPMessage(CharSequence, CharSequence, byte[])
8485
*/
8586
void addMessage(byte[] messageAsBytes) throws IOException;
87+
88+
List<ASAPHop> getASAPHopList();
89+
90+
void setASAPHopList(List<ASAPHop> asapHopList) throws IOException;
8691
}

src/net/sharksystem/asap/ASAPMessages.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,5 +77,5 @@ byte[] getMessage(int position, boolean chronologically)
7777
* @param chronologically
7878
* @return
7979
*/
80-
ASAPInternalChunk getChunk(int position, boolean chronologically) throws IOException, ASAPException;
80+
ASAPChunk getChunk(int position, boolean chronologically) throws IOException, ASAPException;
8181
}

src/net/sharksystem/asap/engine/ASAPInternalChunk.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,4 @@ public interface ASAPInternalChunk extends ASAPChunk {
8484
List<CharSequence> getDeliveredTo();
8585

8686
void copyMetaData(ASAPChannel channel) throws IOException;
87-
88-
List<ASAPHop> getASAPHopList();
89-
90-
void setASAPHopList(List<ASAPHop> asapHopList) throws IOException;
9187
}

src/net/sharksystem/asap/engine/ASAPMessagesMerger.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package net.sharksystem.asap.engine;
22

33
import net.sharksystem.SharkNotSupportedException;
4+
import net.sharksystem.asap.ASAPChunk;
45
import net.sharksystem.asap.ASAPException;
56
import net.sharksystem.asap.ASAPMessageCompare;
67
import net.sharksystem.asap.ASAPMessages;
@@ -392,7 +393,7 @@ public byte[] getMessage(int position, boolean chronologically) throws ASAPExcep
392393
}
393394

394395
@Override
395-
public ASAPInternalChunk getChunk(int position, boolean chronologically) throws IOException, ASAPException {
396+
public ASAPChunk getChunk(int position, boolean chronologically) throws IOException, ASAPException {
396397
SourceIndex sourceIndex = this.getSourceIndex(position, chronologically);
397398
return this.messageSources[sourceIndex.positionInSource].getChunk(sourceIndex.positionInSource, chronologically);
398399
}

0 commit comments

Comments
 (0)