All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.sap.cloud.sdk.s4hana.connectivity.ErpDestination Maven / Gradle / Ivy

The newest version!
/*
 * Copyright (c) 2020 SAP SE or an SAP affiliate company. All rights reserved.
 */

package com.sap.cloud.sdk.s4hana.connectivity;

import javax.annotation.Nonnull;
import javax.servlet.annotation.WebListener;

import com.sap.cloud.sdk.cloudplatform.connectivity.DestinationDeclarator;

/**
 * Extends {@link DestinationDeclarator} and adds ErpQueryEndpoint as a default destination name for ERP query endpoint.
 */
@WebListener
public class ErpDestination extends DestinationDeclarator
{
    private static final String DESTINATION_NAME = "ErpQueryEndpoint";

    /**
     * @return The default name of the ERP destination used for either HTTP or RFC communication.
     */
    @Nonnull
    public static String getDefaultName()
    {
        return DESTINATION_NAME;
    }

    /**
     * @return The default name of the ERP destination used as additional destination if {@link #getDefaultName()} is an
     *         HTTP destination. This is required to transparently support both HTTP and RFC communication via the
     *         respective destinations (a destination can only support either HTTP or RFC).
     */
    @Nonnull
    public static String getDefaultNameRfc()
    {
        return DESTINATION_NAME + ErpConfigContext.DESTINATION_NAME_SUFFIX_RFC;
    }

    /**
     * Default constructor.
     */
    public ErpDestination()
    {
        super(getDefaultName(), getDefaultNameRfc());
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy