com.sap.security.core.server.destinations.api
Interface DestinationService


public interface DestinationService

J2EE service for obtaining connections to backend systems. To use, add a classloader reference from you application to
tc/sec/destinations/service and tc/sec/destinations/interface

Code example for obtaining a HTTP destination

Context ctx = new InitialContext();
DestinationService dstService = (DestinationService) ctx.lookup(DestinationService.JNDI_KEY);
Destination destination = dstService.getDestination(type, name);
HTTPDestination myDestination = (HTTPDestination ) dst.getDestination("HTTP","dst-1");
HttpURLConnection connection = myDestination.getURLConnection();


Field Summary
static java.lang.String JNDI_KEY
          JNDI name under which the service is registered.
static java.lang.String JNDI_KEY_LOCAL
          JNDI name under which the service is registered.
 
Method Summary
 Destination createDestination(java.lang.String type)
          Create a destination of a given destination type.
 Destination createDestination(java.lang.String type, java.lang.Object data)
          Return an instance of a defined destination by passing over the configuration data
 Destination getDestination(java.lang.String type, java.lang.String name)
          Return an instance of a defined destination
 java.util.List getDestinationNames(java.lang.String destinationType)
          Return an Iterator with known destination names for a destination type.
 java.util.List getDestinationTypes()
          Return an Iterator with known destination types.
 java.util.Hashtable getKeystoreViews()
          Reads the list of keystore views and client certificates from the keystore service The name of the views are taken as the keys for the hashtable, with the name of the aliases in the keystore stored as List Used internally
 java.lang.Object getUIMetaData(java.lang.String type, java.lang.Object data)
          Used internally for obtaining UI information
 com.sap.security.core.server.destinations.api.PingResult ping(java.lang.String destinationType, java.lang.String destinationName)
          Execute ping on a destination
 void removeDestination(java.lang.String type, java.lang.String name)
          Remove an destination from the destination store
 void storeDestination(java.lang.String type, Destination destination)
          Add a destination of a given destination type The destination must not yet exist.
 void updateDestination(java.lang.String type, Destination destination)
          Update a destination of a given destination type.
 

Field Detail

JNDI_KEY

public static final java.lang.String JNDI_KEY
JNDI name under which the service is registered. This constant can be used for JNDI lookup.

JNDI_KEY_LOCAL

public static final java.lang.String JNDI_KEY_LOCAL
JNDI name under which the service is registered. This constant can be used for JNDI lookup.
Method Detail

getDestination

public Destination getDestination(java.lang.String type,
                                  java.lang.String name)
                           throws DestinationException,
                                  java.rmi.RemoteException
Return an instance of a defined destination

createDestination

public Destination createDestination(java.lang.String type,
                                     java.lang.Object data)
                              throws DestinationException,
                                     java.rmi.RemoteException
Return an instance of a defined destination by passing over the configuration data

getDestinationTypes

public java.util.List getDestinationTypes()
Return an Iterator with known destination types. The entries are of type String.

getDestinationNames

public java.util.List getDestinationNames(java.lang.String destinationType)
                                   throws DestinationException,
                                          java.rmi.RemoteException
Return an Iterator with known destination names for a destination type. The entries are of type String.

createDestination

public Destination createDestination(java.lang.String type)
                              throws DestinationException,
                                     java.rmi.RemoteException
Create a destination of a given destination type. It does not store the destination.

updateDestination

public void updateDestination(java.lang.String type,
                              Destination destination)
                       throws DestinationException,
                              java.rmi.RemoteException
Update a destination of a given destination type. The destination must exists before.

storeDestination

public void storeDestination(java.lang.String type,
                             Destination destination)
                      throws DestinationException,
                             java.rmi.RemoteException
Add a destination of a given destination type The destination must not yet exist.

removeDestination

public void removeDestination(java.lang.String type,
                              java.lang.String name)
                       throws DestinationException,
                              java.rmi.RemoteException
Remove an destination from the destination store

getKeystoreViews

public java.util.Hashtable getKeystoreViews()
                                     throws DestinationException,
                                            java.rmi.RemoteException
Reads the list of keystore views and client certificates from the keystore service The name of the views are taken as the keys for the hashtable, with the name of the aliases in the keystore stored as List Used internally

getUIMetaData

public java.lang.Object getUIMetaData(java.lang.String type,
                                      java.lang.Object data)
                               throws DestinationException,
                                      java.rmi.RemoteException
Used internally for obtaining UI information
Parameters:
type -  
data -  
Returns:
 
Throws:
DestinationException -  
java.rmi.RemoteException -  

ping

public com.sap.security.core.server.destinations.api.PingResult ping(java.lang.String destinationType,
                                                                     java.lang.String destinationName)
                                                              throws DestinationException,
                                                                     java.rmi.RemoteException
Execute ping on a destination
Parameters:
destinationType -  
destinationName -  
Returns:
 
Throws:
java.rmi.RemoteException -