public class ScpNeoDestinationFacade extends AbstractDestinationFacade
In addition to reading destinations via the SCP Neo destination service API , this class provides the ability to read
HTTP destination information from the environment variable "destinations". The environment variable is expected to be
in JSON format (see AbstractDestinationFacade
).
Constructor and Description |
---|
ScpNeoDestinationFacade() |
Modifier and Type | Method and Description |
---|---|
void |
declareDestinations(Collection<String> destinationNames)
Declares the given destination names.
|
Class<? extends Destination> |
getDestinationClass()
Returns the platform-specific implementation class of
Destination . |
GenericDestination |
getGenericDestination(String destinationName)
Returns the
GenericDestination for the given name. |
Class<? extends GenericDestination> |
getGenericDestinationClass()
Returns the platform-specific implementation class of
GenericDestination . |
Map<String,GenericDestination> |
getGenericDestinationsByName()
Returns all destinations by their names.
|
Class<? extends RfcDestination> |
getRfcDestinationClass()
Returns the platform-specific implementation class of
RfcDestination . |
assertDestinationType, getDestination, getDestinationsByName, getDestinationsForType, getDestinationsFromEnvironmentVariable, getDestinationsFromEnvironmentVariable, getDestinationType, getRfcDestination, getRfcDestinationsByName
@Nonnull public Class<? extends GenericDestination> getGenericDestinationClass()
GenericDestination
. For internal use only.@Nonnull public Class<? extends Destination> getDestinationClass()
Destination
. For internal use only.@Nonnull public Class<? extends RfcDestination> getRfcDestinationClass()
RfcDestination
. For internal use only.public void declareDestinations(@Nonnull Collection<String> destinationNames)
DestinationFacade.getDestination(String)
and DestinationFacade.getDestinationsByName()
, for example, during application
startup within a ServletContextListener.
Notes:
declareDestinations
in interface DestinationFacade
declareDestinations
in class AbstractDestinationFacade
destinationNames
- The collection of all destination names that should get declared.DestinationDeclarator
,
DestinationsRequestContextListener
@Nonnull public GenericDestination getGenericDestination(String destinationName) throws DestinationNotFoundException, DestinationAccessException
GenericDestination
for the given name.getGenericDestination
in interface DestinationFacade
getGenericDestination
in class AbstractDestinationFacade
destinationName
- The destination name to get the associated destination for.DestinationNotFoundException
- If the GenericDestination
cannot be found.DestinationAccessException
- If there is an issue while accessing destination information.@Nonnull public Map<String,GenericDestination> getGenericDestinationsByName() throws DestinationAccessException
DestinationAccessException
- If there is an issue while accessing destination information.Copyright © 2018 SAP SE. All rights reserved.