com.github.marschall.jakartajmsadapter.JakartaObjectMessage Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jakarta-jms-adapter Show documentation
Show all versions of jakarta-jms-adapter Show documentation
Adapts a javax.jms JMS provider to a jakarta.jms JMS provider.
The newest version!
package com.github.marschall.jakartajmsadapter;
import java.io.Serializable;
import jakarta.jms.JMSException;
import jakarta.jms.ObjectMessage;
final class JakartaObjectMessage extends JakartaMessage implements ObjectMessage {
private final javax.jms.ObjectMessage javaxMessage;
JakartaObjectMessage(javax.jms.ObjectMessage javaxMessage) {
super(javaxMessage);
this.javaxMessage = javaxMessage;
}
@Override
public void setObject(Serializable object) throws JMSException {
try {
javaxMessage.setObject(object);
} catch (javax.jms.JMSException e) {
throw JMSExceptionUtil.adaptException(e);
}
}
@Override
public Serializable getObject() throws JMSException {
try {
return javaxMessage.getObject();
} catch (javax.jms.JMSException e) {
throw JMSExceptionUtil.adaptException(e);
}
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy