Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
joram
joram
Commits
c2316645
Commit
c2316645
authored
Oct 04, 2017
by
afreyssin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Moves code handling correlationIDAsBytes in shared message.
parent
ff19f44a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
9 deletions
+27
-9
joram/joram/client/jms/src/main/java/org/objectweb/joram/client/jms/Message.java
...src/main/java/org/objectweb/joram/client/jms/Message.java
+4
-9
joram/joram/shared/src/main/java/org/objectweb/joram/shared/messages/Message.java
...ain/java/org/objectweb/joram/shared/messages/Message.java
+23
-0
No files found.
joram/joram/client/jms/src/main/java/org/objectweb/joram/client/jms/Message.java
View file @
c2316645
...
...
@@ -532,15 +532,10 @@ public class Message implements javax.jms.Message {
*
* @return the correlation ID for the message as an array of bytes.
*
* @exception MessageFormatException In case of a problem while retrieving
* the field.
* @exception JMSException Actually never thrown.
*/
public
final
byte
[]
getJMSCorrelationIDAsBytes
()
throws
JMSException
{
try
{
return
ConversionHelper
.
toBytes
(
momMsg
.
correlationId
);
}
catch
(
MessageValueException
mE
)
{
throw
new
MessageFormatException
(
mE
.
getMessage
());
}
return
momMsg
.
getJMSCorrelationIDAsBytes
();
}
/**
...
...
@@ -553,8 +548,8 @@ public class Message implements javax.jms.Message {
*
* @exception JMSException Actually never thrown.
*/
public
final
void
setJMSCorrelationIDAsBytes
(
byte
[]
correlationID
)
{
momMsg
.
c
orrelationI
d
=
ConversionHelper
.
toString
(
correlationID
);
public
final
void
setJMSCorrelationIDAsBytes
(
byte
[]
correlationID
)
throws
JMSException
{
momMsg
.
setJMSC
orrelationI
DAsBytes
(
correlationID
);
}
/**
...
...
joram/joram/shared/src/main/java/org/objectweb/joram/shared/messages/Message.java
View file @
c2316645
...
...
@@ -264,6 +264,29 @@ public final class Message implements Cloneable, Serializable, Streamable, Encod
/** The correlation identifier field. */
public
transient
String
correlationId
=
null
;
/**
* Gets the correlation ID as an array of bytes for the message.
*
* @return the correlation ID for the message as an array of bytes.
*/
public
final
byte
[]
getJMSCorrelationIDAsBytes
()
{
if
(
correlationId
!=
null
)
return
correlationId
.
getBytes
();
return
null
;
}
/**
* Sets the correlation ID as an array of bytes for the message.
*
* @param correlationID the message ID value as an array of bytes.
*/
public
final
void
setJMSCorrelationIDAsBytes
(
byte
[]
correlationID
)
{
if
(
correlationID
!=
null
)
this
.
correlationId
=
new
String
(
correlationID
);
else
this
.
correlationId
=
null
;
}
/** The number of delivery attempts for this message. */
public
transient
int
deliveryCount
=
0
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment