Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 //  The contents of this file are subject to the Mozilla Public License
 //  Version 1.1 (the "License"); you may not use this file except in
 //  compliance with the License. You may obtain a copy of the License
 //  at http://www.mozilla.org/MPL/
 //
 //  Software distributed under the License is distributed on an "AS IS"
 //  basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
 //  the License for the specific language governing rights and
 //  limitations under the License.
//
//  The Original Code is RabbitMQ.
//
//  The Initial Developer of the Original Code is VMware, Inc.
//  Copyright (c) 2007-2012 VMware, Inc.  All rights reserved.
//
package com.rabbitmq.client;
Constant holder class with useful static instances of com.rabbitmq.client.impl.AMQContentHeader. These are intended for use with Channel.basicPublish(java.lang.String,java.lang.String,com.rabbitmq.client.AMQP.BasicProperties,byte[]) and other Channel methods.
public class MessageProperties {

    
Empty basic properties, with no fields set
    public static final BasicProperties MINIMAL_BASIC =
        new BasicProperties(nullnullnullnull,
                            nullnullnullnull,
                            nullnullnullnull,
                            nullnull);
    
Empty basic properties, with only deliveryMode set to 2 (persistent)
    public static final BasicProperties MINIMAL_PERSISTENT_BASIC =
        new BasicProperties(nullnullnull, 2,
                            nullnullnullnull,
                            nullnullnullnull,
                            nullnull);

    
Content-type "application/octet-stream", deliveryMode 1 (nonpersistent), priority zero
    public static final BasicProperties BASIC =
        new BasicProperties("application/octet-stream",
                            null,
                            null,
                            1,
                            0, nullnullnull,
                            nullnullnullnull,
                            nullnull);

    
Content-type "application/octet-stream", deliveryMode 2 (persistent), priority zero
    public static final BasicProperties PERSISTENT_BASIC =
        new BasicProperties("application/octet-stream",
                            null,
                            null,
                            2,
                            0, nullnullnull,
                            nullnullnullnull,
                            nullnull);

    
Content-type "text/plain", deliveryMode 1 (nonpersistent), priority zero
    public static final BasicProperties TEXT_PLAIN =
        new BasicProperties("text/plain",
                            null,
                            null,
                            1,
                            0, nullnullnull,
                            nullnullnullnull,
                            nullnull);

    
Content-type "text/plain", deliveryMode 2 (persistent), priority zero
    public static final BasicProperties PERSISTENT_TEXT_PLAIN =
        new BasicProperties("text/plain",
                            null,
                            null,
                            2,
                            0, nullnullnull,
                            nullnullnullnull,
                            nullnull);
New to GrepCode? Check out our FAQ X