Search in sources :

Example 21 with InternalMessageHeader

use of org.apache.qpid.server.message.internal.InternalMessageHeader in project qpid-broker-j by apache.

the class PropertyConverter_Internal_to_v0_8Test method createTestMessage.

private InternalMessage createTestMessage(String to) {
    final InternalMessageHeader internalMessageHeader = new InternalMessageHeader(mock(AMQMessageHeader.class));
    final StoredMessage<InternalMessageMetaData> handle = createInternalStoredMessage(false, internalMessageHeader, 0);
    return new InternalMessage(handle, internalMessageHeader, null, to);
}
Also used : InternalMessage(org.apache.qpid.server.message.internal.InternalMessage) InternalMessageMetaData(org.apache.qpid.server.message.internal.InternalMessageMetaData) InternalMessageHeader(org.apache.qpid.server.message.internal.InternalMessageHeader) AMQMessageHeader(org.apache.qpid.server.message.AMQMessageHeader)

Example 22 with InternalMessageHeader

use of org.apache.qpid.server.message.internal.InternalMessageHeader in project qpid-broker-j by apache.

the class VirtualHostPropertiesNode method createMessage.

protected InternalMessage createMessage() {
    Map<String, Object> headers = new HashMap<>();
    final List<String> globalAddressDomains = _addressSpace.getGlobalAddressDomains();
    if (globalAddressDomains != null && !globalAddressDomains.isEmpty()) {
        String primaryDomain = globalAddressDomains.get(0);
        if (primaryDomain != null) {
            primaryDomain = primaryDomain.trim();
            if (!primaryDomain.endsWith("/")) {
                primaryDomain += "/";
            }
            headers.put("virtualHost.temporaryQueuePrefix", primaryDomain);
        }
    }
    InternalMessageHeader header = new InternalMessageHeader(headers, null, 0l, null, null, UUID.randomUUID().toString(), null, null, (byte) 4, System.currentTimeMillis(), 0L, null, null, System.currentTimeMillis());
    final InternalMessage message = InternalMessage.createBytesMessage(_addressSpace.getMessageStore(), header, new byte[0]);
    message.setInitialRoutingAddress(getName());
    return message;
}
Also used : InternalMessage(org.apache.qpid.server.message.internal.InternalMessage) HashMap(java.util.HashMap) InternalMessageHeader(org.apache.qpid.server.message.internal.InternalMessageHeader)

Aggregations

InternalMessageHeader (org.apache.qpid.server.message.internal.InternalMessageHeader)22 InternalMessageMetaData (org.apache.qpid.server.message.internal.InternalMessageMetaData)9 HashMap (java.util.HashMap)7 ConfiguredObject (org.apache.qpid.server.model.ConfiguredObject)7 AbstractConfiguredObject (org.apache.qpid.server.model.AbstractConfiguredObject)6 ManagedObject (org.apache.qpid.server.model.ManagedObject)6 AMQMessageHeader (org.apache.qpid.server.message.AMQMessageHeader)5 InternalMessage (org.apache.qpid.server.message.internal.InternalMessage)5 LinkedHashMap (java.util.LinkedHashMap)4 Map (java.util.Map)3 MessageProperties (org.apache.qpid.server.protocol.v0_10.transport.MessageProperties)2 AccessControlException (java.security.AccessControlException)1 Certificate (java.security.cert.Certificate)1 CertificateEncodingException (java.security.cert.CertificateEncodingException)1 ArrayList (java.util.ArrayList)1 IllegalConfigurationException (org.apache.qpid.server.configuration.IllegalConfigurationException)1 AmqpConnectionMetaData (org.apache.qpid.server.connection.AmqpConnectionMetaData)1 ConfiguredObjectOperation (org.apache.qpid.server.model.ConfiguredObjectOperation)1 IntegrityViolationException (org.apache.qpid.server.model.IntegrityViolationException)1 DeliveryProperties (org.apache.qpid.server.protocol.v0_10.transport.DeliveryProperties)1