Rational Developer for Power Systems Software
V7.6

com.ibm.etools.iseries.subsystems.qsys.comm.bridge
Class CommAliasManager

java.lang.Object
  extended by com.ibm.etools.iseries.subsystems.qsys.comm.bridge.CommAliasManager

public class CommAliasManager
extends Object

This class keeps track of the communication aliases used by the CODE <-> RSE communications bridge. This is different than the CODE aliases managed by the CODEServerManager. The aliases generated by CommAliasManager are never registered with the CODE communications daemon for performance reasons. Aliases generated by the CODEServerManager are registered / de-registered with the CODE communications daemon. Although the same algorithm is used for generating aliases there is no guarantee that the same alias will be used by both for the same connection.


Field Summary
static int ALIAS_NOT_DEFINED
           
static int ALIAS_TYPE_UNKNOWN
           
static String copyright
           
static int ISERIES_CONNECTION_ALIAS
           
static int ISERIES_PROJECT_ALIAS
          Constants representing the different types of aliases that can be generated
 
Method Summary
static String getAlias(IBMiConnection connection)
          Get the alias for the specified ISeriesConnection.
static String getAlias(IFile file)
          Get the alias for the specified IFile, the IFile must be contained either within an iSeries Project or the RemoteSystemsTempProject.
static String getAlias(IProject project)
          Get the alias for the specified iSeries project.
static int getAliasType(String alias)
          Returns the type of alias.
static IBMiConnection getConnection(String alias)
          Get the ISeriesConnection object associated with the specified alias.
static IProject getProject(String alias)
          Get the IProject associated with the alias.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

copyright

public static final String copyright
See Also:
Constant Field Values

ISERIES_PROJECT_ALIAS

public static final int ISERIES_PROJECT_ALIAS
Constants representing the different types of aliases that can be generated

See Also:
Constant Field Values

ISERIES_CONNECTION_ALIAS

public static final int ISERIES_CONNECTION_ALIAS
See Also:
Constant Field Values

ALIAS_NOT_DEFINED

public static final int ALIAS_NOT_DEFINED
See Also:
Constant Field Values

ALIAS_TYPE_UNKNOWN

public static final int ALIAS_TYPE_UNKNOWN
See Also:
Constant Field Values
Method Detail

getAlias

public static String getAlias(IBMiConnection connection)
Get the alias for the specified ISeriesConnection. A new alias is created if one does not already exist for this connection.


getAlias

public static String getAlias(IProject project)
Get the alias for the specified iSeries project. The project must be an iSeries project. A new alias is created if one does not already exist for this connection.


getAlias

public static String getAlias(IFile file)
Get the alias for the specified IFile, the IFile must be contained either within an iSeries Project or the RemoteSystemsTempProject.

Returns:
The alias for this IFile's project or ISeriesConnection, or null if the IFile is not part of an iSeries project or the RemoteSystemsTempFiles project.

getConnection

public static IBMiConnection getConnection(String alias)
Get the ISeriesConnection object associated with the specified alias. If the alias is an iSeries project alias then this method returns the ISeriesConnection associated with the project.

Returns:
ISeriesConnection associated with the alias parameter or null if none exists.

getProject

public static IProject getProject(String alias)
Get the IProject associated with the alias. Use the getAliasType(String alias) method to first check the type of alias to make sure it is associated with an iSeries project.


getAliasType

public static int getAliasType(String alias)
Returns the type of alias. Possible return types are: PROJECT_ALIAS ISERIESCONNECTION_ALIAS ALIAS_NOT_DEFINED ALIAS_TYPE_UNKNOWN (this should never occur)


Rational Developer for Power Systems Software
V7.6

Copyright © 2011 IBM Corp. All Rights Reserved.

Note: This documentation is for part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.