[jboss-cvs] JBoss Messaging SVN: r4823 - in branches/Branch_Message_Chunking_new/src/main/org/jboss/messaging/core/remoting: impl and 1 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Mon Aug 18 09:02:19 EDT 2008
Author: ataylor
Date: 2008-08-18 09:02:19 -0400 (Mon, 18 Aug 2008)
New Revision: 4823
Modified:
branches/Branch_Message_Chunking_new/src/main/org/jboss/messaging/core/remoting/Packet.java
branches/Branch_Message_Chunking_new/src/main/org/jboss/messaging/core/remoting/impl/RemotingConnectionImpl.java
branches/Branch_Message_Chunking_new/src/main/org/jboss/messaging/core/remoting/impl/wireformat/PacketImpl.java
Log:
more tidying up
Modified: branches/Branch_Message_Chunking_new/src/main/org/jboss/messaging/core/remoting/Packet.java
===================================================================
--- branches/Branch_Message_Chunking_new/src/main/org/jboss/messaging/core/remoting/Packet.java 2008-08-18 10:41:20 UTC (rev 4822)
+++ branches/Branch_Message_Chunking_new/src/main/org/jboss/messaging/core/remoting/Packet.java 2008-08-18 13:02:19 UTC (rev 4823)
@@ -59,7 +59,7 @@
void normalize(Packet other);
- void encode(MessagingBuffer buffer, int packetId);
+ List<MessagingBuffer> encode(MessagingBuffer buffer, int packetId);
void decode();
@@ -131,8 +131,6 @@
void transferRemainingBuffer(Encoder buffer, int len);
- List<MessagingBuffer> getBuffers();
-
void addBuffer(MessagingBuffer buffer, int packetLength);
List<MessagingBuffer> getBodyType();
Modified: branches/Branch_Message_Chunking_new/src/main/org/jboss/messaging/core/remoting/impl/RemotingConnectionImpl.java
===================================================================
--- branches/Branch_Message_Chunking_new/src/main/org/jboss/messaging/core/remoting/impl/RemotingConnectionImpl.java 2008-08-18 10:41:20 UTC (rev 4822)
+++ branches/Branch_Message_Chunking_new/src/main/org/jboss/messaging/core/remoting/impl/RemotingConnectionImpl.java 2008-08-18 13:02:19 UTC (rev 4823)
@@ -304,8 +304,8 @@
MessagingBuffer buffer = transportConnection.createBuffer(PacketImpl.INITIAL_BUFFER_SIZE + PacketImpl.BUFFER_HEADER_SIZE);
- packet.encode(buffer, packetIdCreator.getAndIncrement());
- for (MessagingBuffer buff : packet.getBuffers())
+ List<MessagingBuffer> buffers = packet.encode(buffer, packetIdCreator.getAndIncrement());
+ for (MessagingBuffer buff : buffers)
{
transportConnection.write(buff);
}
Modified: branches/Branch_Message_Chunking_new/src/main/org/jboss/messaging/core/remoting/impl/wireformat/PacketImpl.java
===================================================================
--- branches/Branch_Message_Chunking_new/src/main/org/jboss/messaging/core/remoting/impl/wireformat/PacketImpl.java 2008-08-18 10:41:20 UTC (rev 4822)
+++ branches/Branch_Message_Chunking_new/src/main/org/jboss/messaging/core/remoting/impl/wireformat/PacketImpl.java 2008-08-18 13:02:19 UTC (rev 4823)
@@ -30,7 +30,6 @@
import static org.jboss.messaging.util.DataConstants.SIZE_INT;
import java.nio.charset.Charset;
-import java.util.ArrayList;
import java.util.List;
/**
@@ -195,7 +194,7 @@
setTargetID(other.getResponseTargetID());
}
- public void encode(MessagingBuffer buffer,int packetId)
+ public List<MessagingBuffer> encode(MessagingBuffer buffer,int packetId)
{
//The standard header fields
buffers.add(buffer);
@@ -227,6 +226,7 @@
messagingBuffer.putBoolean(SIZE_INT * 2, true);
}
}
+ return buffers;
}
public void decode()
@@ -268,16 +268,6 @@
r.executorID == this.executorID &&
r.targetID == this.targetID;
}
- public List<MessagingBuffer> getBuffers()
- {
- List<MessagingBuffer> buffers = new ArrayList<MessagingBuffer>();
- for (int i = 0; i < this.buffers.size(); i++)
- {
- MessagingBuffer buffer = this.buffers.get(i).slice();
- buffers.add(buffer);
- }
- return buffers;
- }
public void addBuffer(MessagingBuffer buffer, int packetLength)
{
More information about the jboss-cvs-commits
mailing list