Oracle Fusion Middleware Java API Reference for Oracle TopLink
11g Release 1 (11.1.1)

B32476-03

oracle.toplink.remotecommand
Class TransportManager

java.lang.Object
  extended by oracle.toplink.remotecommand.TransportManager
Direct Known Subclasses:
BroadcastTransportManager, CORBATransportManager, RMITransportManager

public abstract class TransportManager
extends java.lang.Object

Purpose: Provide an abstract class that offers a common API to handling remote command connections.

Description: This class manages the remote connections to other RCM service instances and posts the local connection to this service instance in a name service so that other RCM service instances can connect to it.

Since:
OracleAS TopLink 10g (9.0.4)

Field Summary
static java.lang.String DEFAULT_CONTEXT_FACTORY
          Default JNDI properties for remote access
static java.lang.String DEFAULT_DEDICATED_CONNECTION_KEY
           
static java.lang.String DEFAULT_DEDICATED_CONNECTION_VALUE
           
static java.lang.String DEFAULT_IIOP_URL_PORT
           
static java.lang.String DEFAULT_IIOP_URL_PROTOCOL
           
static int DEFAULT_NAMING_SERVICE
           
static boolean DEFAULT_REMOVE_CONNECTION_ON_ERROR_MODE
           
static java.lang.String DEFAULT_URL_PORT
           
static java.lang.String DEFAULT_URL_PROTOCOL
          Defaults for RMI applications assume that we are running in OC4J
static java.lang.String DEFAULT_USER_NAME
           
static int JNDI_NAMING_SERVICE
          Valid values for naming service type
static int REGISTRY_NAMING_SERVICE
           
 
Constructor Summary
TransportManager()
           
 
Method Summary
 DiscoveryManager createDiscoveryManager()
          ADVANCED: Factory of new DiscoveryManager for different transports.
 java.lang.String getInitialContextFactoryName()
          Return the context factory name used as the value to the INITIAL_CONTEXT_FACTORY key in the cached context properties.
 java.util.Hashtable getLocalContextProperties()
          ADVANCED: Return the properties that will be used to create the initial context for local JNDI access.
 int getNamingServiceType()
          Return the type of naming service used to look up remote connections to other service instances.
 java.lang.String getPassword()
          Return the password used as the value to the SECURITY_CREDENTIALS key in the cached context properties.
 java.util.Hashtable getRemoteContextProperties()
          ADVANCED: Return the cached properties that will be used to create the initial context when doing remote JNDI lookups.
 java.lang.String getUserName()
          Return the user name used as the value to the SECURITY_PRINCIPAL key in the cached context properties.
abstract  void removeLocalConnection()
          ADVANCED: Remove the local connection from remote accesses.
 void setEncryptedPassword(java.lang.String encryptedPassword)
          ADVANCED: Set the encrypted password used as the value to the SECURITY_CREDENTIALS key in the cached context properties.
 void setInitialContextFactoryName(java.lang.String contextFactoryName)
          ADVANCED: Set the context factory name used as the value to the INITIAL_CONTEXT_FACTORY key in the cached context properties.
 void setLocalContextProperties(java.util.Hashtable properties)
          ADVANCED: Set the properties that will be used to create the initial context for local JNDI access.
 void setNamingServiceType(int serviceType)
          ADVANCED: Set the type of naming service used to look up remote connections to other service instances.
 void setPassword(java.lang.String password)
          ADVANCED: Set the password used as the value to the SECURITY_CREDENTIALS key in the cached context properties.
 void setRemoteContextProperties(java.util.Hashtable properties)
          ADVANCED: Set the cached properties that will be used to create the initial context when doing remote JNDI lookups.
 void setShouldRemoveConnectionOnError(boolean shouldRemoveConnectionOnError)
          Set whether connections to remote services should be disconnected when an error occurs.
 void setUserName(java.lang.String userName)
          ADVANCED: Set the user name used as the value to the SECURITY_PRINCIPAL key in the cached context properties.
 boolean shouldRemoveConnectionOnError()
          Return whether connections to remote services should be disconnected when an error occurs.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_REMOVE_CONNECTION_ON_ERROR_MODE

public static final boolean DEFAULT_REMOVE_CONNECTION_ON_ERROR_MODE
See Also:
Constant Field Values

JNDI_NAMING_SERVICE

public static final int JNDI_NAMING_SERVICE
Description copied from class: TransportManager
Valid values for naming service type

See Also:
Constant Field Values

REGISTRY_NAMING_SERVICE

public static final int REGISTRY_NAMING_SERVICE
See Also:
Constant Field Values

DEFAULT_URL_PROTOCOL

public static final java.lang.String DEFAULT_URL_PROTOCOL
Description copied from class: TransportManager
Defaults for RMI applications assume that we are running in OC4J

See Also:
Constant Field Values

DEFAULT_IIOP_URL_PROTOCOL

public static final java.lang.String DEFAULT_IIOP_URL_PROTOCOL
See Also:
Constant Field Values

DEFAULT_URL_PORT

public static final java.lang.String DEFAULT_URL_PORT
See Also:
Constant Field Values

DEFAULT_IIOP_URL_PORT

public static final java.lang.String DEFAULT_IIOP_URL_PORT
See Also:
Constant Field Values

DEFAULT_NAMING_SERVICE

public static final int DEFAULT_NAMING_SERVICE
See Also:
Constant Field Values

DEFAULT_CONTEXT_FACTORY

public static final java.lang.String DEFAULT_CONTEXT_FACTORY
Description copied from class: TransportManager
Default JNDI properties for remote access

See Also:
Constant Field Values

DEFAULT_DEDICATED_CONNECTION_KEY

public static final java.lang.String DEFAULT_DEDICATED_CONNECTION_KEY
See Also:
Constant Field Values

DEFAULT_DEDICATED_CONNECTION_VALUE

public static final java.lang.String DEFAULT_DEDICATED_CONNECTION_VALUE
See Also:
Constant Field Values

DEFAULT_USER_NAME

public static final java.lang.String DEFAULT_USER_NAME
See Also:
Constant Field Values
Constructor Detail

TransportManager

public TransportManager()
Method Detail

getNamingServiceType

public int getNamingServiceType()
Return the type of naming service used to look up remote connections to other service instances.

Returns:
The type of naming service used.

setNamingServiceType

public void setNamingServiceType(int serviceType)
ADVANCED: Set the type of naming service used to look up remote connections to other service instances. The service type must be one of JNDI_NAMING_SERVICE or REGISTRY_NAMING_SERVICE.


getUserName

public java.lang.String getUserName()
Return the user name used as the value to the SECURITY_PRINCIPAL key in the cached context properties.


setUserName

public void setUserName(java.lang.String userName)
ADVANCED: Set the user name used as the value to the SECURITY_PRINCIPAL key in the cached context properties.


getPassword

public java.lang.String getPassword()
Return the password used as the value to the SECURITY_CREDENTIALS key in the cached context properties.


setPassword

public void setPassword(java.lang.String password)
ADVANCED: Set the password used as the value to the SECURITY_CREDENTIALS key in the cached context properties.


setEncryptedPassword

public void setEncryptedPassword(java.lang.String encryptedPassword)
ADVANCED: Set the encrypted password used as the value to the SECURITY_CREDENTIALS key in the cached context properties.


getInitialContextFactoryName

public java.lang.String getInitialContextFactoryName()
Return the context factory name used as the value to the INITIAL_CONTEXT_FACTORY key in the cached context properties.


setInitialContextFactoryName

public void setInitialContextFactoryName(java.lang.String contextFactoryName)
ADVANCED: Set the context factory name used as the value to the INITIAL_CONTEXT_FACTORY key in the cached context properties.


getRemoteContextProperties

public java.util.Hashtable getRemoteContextProperties()
ADVANCED: Return the cached properties that will be used to create the initial context when doing remote JNDI lookups.


setRemoteContextProperties

public void setRemoteContextProperties(java.util.Hashtable properties)
ADVANCED: Set the cached properties that will be used to create the initial context when doing remote JNDI lookups.


getLocalContextProperties

public java.util.Hashtable getLocalContextProperties()
ADVANCED: Return the properties that will be used to create the initial context for local JNDI access.


setLocalContextProperties

public void setLocalContextProperties(java.util.Hashtable properties)
ADVANCED: Set the properties that will be used to create the initial context for local JNDI access.


setShouldRemoveConnectionOnError

public void setShouldRemoveConnectionOnError(boolean shouldRemoveConnectionOnError)
Set whether connections to remote services should be disconnected when an error occurs.


shouldRemoveConnectionOnError

public boolean shouldRemoveConnectionOnError()
Return whether connections to remote services should be disconnected when an error occurs.


createDiscoveryManager

public DiscoveryManager createDiscoveryManager()
ADVANCED: Factory of new DiscoveryManager for different transports. The RemoteCommandManger uses this method to create its DicscoveryManager. Sub-class of TransportManager should return special discovery if required. The default is discovery type is DiscoveryManager; If this method returns null then during initialization RemoteCommandManager calls createConnections method.


removeLocalConnection

public abstract void removeLocalConnection()
ADVANCED: Remove the local connection from remote accesses. The implementation should set remove the local connection from JNDI or JMS and set it to null. This method is invoked internally by TopLink when the RCM is shutdown and should not be invoked by user's application.


Copyright © 1998, 2010, Oracle. All Rights Reserved.