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.
|
GenericDestination |
getGenericDestination(String destinationName)
Returns the
GenericDeclaration for the given name. |
Map<String,GenericDestination> |
getGenericDestinationsByName()
Returns all destinations by their names.
|
getDestination, getDestinationsByName, getDestinationType, getRfcDestination, getRfcDestinationsByName
public void declareDestinations(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
,
RequestContext
,
DestinationsRequestContextListener
public GenericDestination getGenericDestination(String destinationName) throws DestinationNotFoundException, DestinationAccessException
GenericDeclaration
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 GenericDeclaration
cannot be found.DestinationAccessException
- If there is an issue while accessing destination information.public Map<String,GenericDestination> getGenericDestinationsByName() throws DestinationAccessException
DestinationAccessException
- If there is an issue while accessing destination information.Copyright © 2018 SAP SE. All rights reserved.