Java Code Examples for org.apache.qpid.proton.amqp.messaging.ApplicationProperties#getValue()

The following examples show how to use org.apache.qpid.proton.amqp.messaging.ApplicationProperties#getValue() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: AMQPMessage.java    From activemq-artemis with Apache License 2.0 6 votes vote down vote up
@SuppressWarnings("unchecked")
protected Map<String, Object> getApplicationPropertiesMap(boolean createIfAbsent) {
   ApplicationProperties appMap = lazyDecodeApplicationProperties();
   Map<String, Object> map = null;

   if (appMap != null) {
      map = appMap.getValue();
   }

   if (map == null) {
      if (createIfAbsent) {
         map = new HashMap<>();
         this.applicationProperties = new ApplicationProperties(map);
      } else {
         map = Collections.EMPTY_MAP;
      }
   }

   return map;
}
 
Example 2
Source File: AmqpCoreConverter.java    From activemq-artemis with Apache License 2.0 5 votes vote down vote up
private static ServerJMSMessage processApplicationProperties(ServerJMSMessage jms, ApplicationProperties properties) throws Exception {
   if (properties != null && properties.getValue() != null) {
      for (Map.Entry<String, Object> entry : (Set<Map.Entry<String, Object>>) properties.getValue().entrySet()) {
         setProperty(jms, entry.getKey(), entry.getValue());
      }
   }

   return jms;
}
 
Example 3
Source File: ApplicationPropertiesType.java    From qpid-proton-j with Apache License 2.0 4 votes vote down vote up
@Override
protected Map wrap(ApplicationProperties val)
{
    return val.getValue();
}
 
Example 4
Source File: AmqpJmsMessageFacade.java    From qpid-jms with Apache License 2.0 4 votes vote down vote up
void setApplicationProperties(ApplicationProperties applicationProperties) {
    if (applicationProperties != null) {
        this.applicationPropertiesMap = applicationProperties.getValue();
    }
}