001/*
002 * To change this license header, choose License Headers in Project Properties.
003 * To change this template file, choose Tools | Templates
004 * and open the template in the editor.
005 */
006package ca.uhn.fhir.rest.gclient;
007
008/*
009 * #%L
010 * HAPI FHIR - Core Library
011 * %%
012 * Copyright (C) 2014 - 2022 Smile CDR, Inc.
013 * %%
014 * Licensed under the Apache License, Version 2.0 (the "License");
015 * you may not use this file except in compliance with the License.
016 * You may obtain a copy of the License at
017 *
018 *      http://www.apache.org/licenses/LICENSE-2.0
019 *
020 * Unless required by applicable law or agreed to in writing, software
021 * distributed under the License is distributed on an "AS IS" BASIS,
022 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
023 * See the License for the specific language governing permissions and
024 * limitations under the License.
025 * #L%
026 */
027
028import org.hl7.fhir.instance.model.api.IBaseBundle;
029import org.hl7.fhir.instance.model.api.IBaseResource;
030
031/**
032 *
033 * @author HGS
034 */
035public interface IOperationProcessMsg{
036
037    /**
038     * Set the Message Bundle to POST to the messaging server.<br>
039     * After this call you must choose either the method synchronous or asynchronous to set the processing mode.
040     * 
041     * @param <R>
042     * @param theMsgBundle A Bundle of type message
043     * @return 
044     */
045    <R extends IBaseResource> IOperationProcessMsgMode<R> setMessageBundle(IBaseBundle theMsgBundle);
046
047    /**
048     * An optional query parameter indicating that responses from the receiving server should be sent to this url
049     * 
050     * @param respondToUri The receiving endpoint to witch server response messages should be sent.
051     * @return 
052     */
053    IOperationProcessMsg setResponseUrlParam(String respondToUri);
054}