Skip to content

Commit 567afd2

Browse files
author
Steve Powell
committed
Moved LongString to com.rabbitmq.client (from ...impl).
1 parent 60f1cd0 commit 567afd2

19 files changed

+29
-17
lines changed

codegen.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,6 @@ def printHeader():
161161
print
162162
print "import com.rabbitmq.client.impl.ContentHeaderPropertyWriter;"
163163
print "import com.rabbitmq.client.impl.ContentHeaderPropertyReader;"
164-
print "import com.rabbitmq.client.impl.LongString;"
165164
print "import com.rabbitmq.client.impl.LongStringHelper;"
166165

167166
def printProtocolClass():
@@ -422,6 +421,7 @@ def printHeader():
422421
print "import java.util.Map;"
423422
print
424423
print "import com.rabbitmq.client.AMQP;"
424+
print "import com.rabbitmq.client.LongString;"
425425
print "import com.rabbitmq.client.UnknownClassOrMethodId;"
426426
print "import com.rabbitmq.client.UnexpectedMethodError;"
427427

src/com/rabbitmq/client/JDKSaslConfig.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616

1717
package com.rabbitmq.client;
1818

19-
import com.rabbitmq.client.impl.LongString;
2019
import com.rabbitmq.client.impl.LongStringHelper;
2120

2221
import javax.security.auth.callback.Callback;

src/com/rabbitmq/client/impl/LongString.java renamed to src/com/rabbitmq/client/LongString.java

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
//
1616

1717

18-
package com.rabbitmq.client.impl;
18+
package com.rabbitmq.client;
1919

2020
import java.io.DataInputStream;
2121
import java.io.IOException;
@@ -31,26 +31,26 @@ public interface LongString
3131
public static final long MAX_LENGTH = 0xffffffffL;
3232

3333
/**
34-
* Get the length of the content of the long string in bytes
35-
* @return the length in bytes >= 0 <= MAX_LENGTH
34+
* @return the length of the {@link LongString} in bytes >= 0 <= MAX_LENGTH
3635
*/
3736
public long length();
3837

3938
/**
4039
* Get the content stream.
4140
* Repeated calls to this function return the same stream,
4241
* which may not support rewind.
43-
* @return An input stream the reads the content
42+
* @return An input stream that reads the content of the {@link LongString}
4443
* @throws IOException if an error is encountered
4544
*/
4645
public DataInputStream getStream() throws IOException;
4746

4847
/**
49-
* Get the content as a byte array.
50-
* Repeated calls to this function return the same array.
51-
* This function will fail if getContentLength() > Integer.MAX_VALUE
52-
* throwing an IllegalStateException.
53-
* @return the content as an array
48+
* Get the content as a byte array. This need not be a copy. Updates to the
49+
* returned array may change the value of the {@link LongString}.
50+
* Repeated calls to this function may return the same array.
51+
* This function will fail if <code><b>this</b>.length() > Integer.MAX_VALUE</code>,
52+
* throwing an {@link IllegalStateException}.
53+
* @return the array of bytes containing the content of the {@link LongString}
5454
*/
5555
public byte [] getBytes();
5656
}

src/com/rabbitmq/client/RpcClient.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ public String stringCall(String message)
234234
* Perform an AMQP wire-protocol-table based RPC roundtrip <br><br>
235235
*
236236
* There are some restrictions on the values appearing in the table: <br>
237-
* they must be of type {@link String}, {@link com.rabbitmq.client.impl.LongString}, {@link Integer}, {@link java.math.BigDecimal}, {@link Date},
237+
* they must be of type {@link String}, {@link com.rabbitmq.client.LongString}, {@link Integer}, {@link java.math.BigDecimal}, {@link Date},
238238
* or (recursively) a {@link Map} of the enclosing type.
239239
*
240240
* @param message the table to send

src/com/rabbitmq/client/SaslMechanism.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616

1717
package com.rabbitmq.client;
1818

19-
import com.rabbitmq.client.impl.LongString;
2019

2120
import java.io.IOException;
2221

src/com/rabbitmq/client/UnexpectedMethodError.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@
1717

1818
package com.rabbitmq.client;
1919

20-
import com.rabbitmq.client.impl.Method;
21-
2220
/**
2321
* Indicates that a {@link Method} object was supplied that was not
2422
* expected. For instance, {@link Channel#basicGet} throws this if it

src/com/rabbitmq/client/impl/AMQConnection.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
import com.rabbitmq.client.Command;
3232
import com.rabbitmq.client.Connection;
3333
import com.rabbitmq.client.ConnectionFactory;
34+
import com.rabbitmq.client.LongString;
3435
import com.rabbitmq.client.MissedHeartbeatException;
3536
import com.rabbitmq.client.PossibleAuthenticationFailureException;
3637
import com.rabbitmq.client.ProtocolVersionMismatchException;

src/com/rabbitmq/client/impl/CRDemoMechanism.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
package com.rabbitmq.client.impl;
1818

1919
import com.rabbitmq.client.ConnectionFactory;
20+
import com.rabbitmq.client.LongString;
2021
import com.rabbitmq.client.SaslConfig;
2122
import com.rabbitmq.client.SaslMechanism;
2223

src/com/rabbitmq/client/impl/ContentHeaderPropertyReader.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
import java.util.Map;
2424

2525
import com.rabbitmq.client.ContentHeader;
26+
import com.rabbitmq.client.LongString;
2627

2728
/**
2829
* Parses an AMQP wire-protocol {@link ContentHeader} from a

src/com/rabbitmq/client/impl/ContentHeaderPropertyWriter.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
import java.util.Map;
2424

2525
import com.rabbitmq.client.ContentHeader;
26+
import com.rabbitmq.client.LongString;
2627

2728
/**
2829
* Generates an AMQP wire-protocol packet from a {@link ContentHeader}.

0 commit comments

Comments
 (0)