/**
 * Copyright (C) 2009-2014 Dell, Inc.
 * See annotations for authorship information
 *
 * ====================================================================
 * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * ====================================================================
 */

package org.dasein.cloud;

import javax.annotation.Nonnull;

/**
 * Created by Drew Lyall: 12/09/2014 16:51
 * @author Drew Lyall
 * @since 2014.08 - Fork
 * @version 2014.08 - Fork
 */
public class RequestTrackingStrategy{

    public static @Nonnull RequestTrackingStrategy getInstance(@Nonnull String requestID){
        return new RequestTrackingStrategy(requestID);
    }

    private String  requestID;
    private boolean sendAsHeader;
    private boolean inAPITrace;

    private RequestTrackingStrategy(){}

    private RequestTrackingStrategy(@Nonnull String requestID){
        this.requestID = requestID;
        this.sendAsHeader = false;
        this.inAPITrace = false;
    }

    public @Nonnull String getRequestID(){
        return this.requestID;
    }

    public boolean getSendAsHeader(){
        return this.sendAsHeader;
    }

    public boolean getInAPITrace(){
        return this.inAPITrace;
    }

    public @Nonnull RequestTrackingStrategy sendAsHeader(boolean sendAsHeader){
        this.sendAsHeader = sendAsHeader;
        return this;
    }

    public @Nonnull RequestTrackingStrategy includeInAPITrace(boolean inAPITrace){
        this.inAPITrace = inAPITrace;
        return this;
    }
}

Add TrackingStrategy