WebLogic Integration


com.bea.wlai.client
Class ApplicationViewManager

java.lang.Object
  |
  +--com.bea.wlai.client.ApplicationViewManager

public class ApplicationViewManager
extends java.lang.Object

Manages access to ApplicationViews. This class handles adding, removing, and getting ApplicationViews in a given Namespace. This class also offers facilities to deploy and undeploy ApplicationViews, get an instance of an ApplicationView, and to check if an ApplicationView is deployed.

Author:
Copyright © 2000, 2001 BEA Systems, Inc. All Rights Reserved.

Constructor Summary
ApplicationViewManager(java.util.Hashtable props)
          Create a new ApplicationViewManager using a new InitialContext obtained using the given Hashtable of properties.
ApplicationViewManager(javax.naming.InitialContext context)
          Create a new ApplicationViewManager using the given InitialContext.
 
Method Summary
 IApplicationViewDescriptor addApplicationView(INamespace parent, java.lang.String appViewName)
          Creates an application view with the given name, adds it to the given parent namespace, and returns a descriptor for it.
 void deployApplicationView(IApplicationViewDescriptor appView, boolean allowRebind, boolean persistent)
          Deploy the application view represented by the given descriptor into the WLAI engine.
 boolean exists(QualifiedName aQualifiedName)
          Determine whether the application view represented by a qualified name exists in the repository.
 AdapterInfo getAdapterInfoForApplicationView(QualifiedName name)
          Returns information about the adapter associated with an application view with the given name.
 IApplicationViewDescriptor getApplicationView(QualifiedName name)
          Gets the application view with the given qualified name and returns a descriptor for it.
 ApplicationView getApplicationViewInstance(QualifiedName name)
          Create a new instance of the application view with the given qualified name.
 ApplicationView getApplicationViewInstance(QualifiedName name, java.lang.String strInstanceID)
           
 boolean isApplicationViewDeployed(QualifiedName name)
          Indicates whether an application view with the given qualified name has been deployed within the WLAI engine.
 IApplicationViewDescriptor removeApplicationView(QualifiedName name)
          Removes the application view with the given qualified name from its parent namespace, and returns a descriptor for it.
 IApplicationViewDescriptor undeployApplicationView(QualifiedName name, boolean force, boolean persistent)
          Undeploy the application view represented by the given QualifiedName from the WLAI engine.
 void updateApplicationView(IApplicationViewDescriptor appView)
          Updates the given ApplicationViewDescriptor within the WLAI repository.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ApplicationViewManager

public ApplicationViewManager(java.util.Hashtable props)
                       throws javax.naming.NamingException,
                              javax.ejb.CreateException,
                              java.rmi.RemoteException
Create a new ApplicationViewManager using a new InitialContext obtained using the given Hashtable of properties.

Throws:
javax.naming.NamingException - If the attempt to create an InitialContext fails. or the ApplicationViewManagerHome interface cannot be found in JNDI.
javax.ejb.CreateException - If the attempt to create an ApplicationViewManagerRemote interface fails.
java.rmi.RemoteException - If an RMI communication failure occurs.

ApplicationViewManager

public ApplicationViewManager(javax.naming.InitialContext context)
                       throws javax.naming.NamingException,
                              javax.ejb.CreateException,
                              java.rmi.RemoteException
Create a new ApplicationViewManager using the given InitialContext.

Throws:
javax.naming.NamingException - If the ApplicationViewManagerHome interface cannot be found in JNDI.
javax.ejb.CreateException - If the attempt to create an ApplicationViewManagerRemote interface fails.
java.rmi.RemoteException - If an RMI communication failure occurs.
Method Detail

addApplicationView

public IApplicationViewDescriptor addApplicationView(INamespace parent,
                                                     java.lang.String appViewName)
                                              throws DuplicateNameException,
                                                     NamespaceException,
                                                     ApplicationViewException,
                                                     java.rmi.RemoteException
Creates an application view with the given name, adds it to the given parent namespace, and returns a descriptor for it.

Parameters:
parent - The namespace to which the new application view will be added.
appViewName - The name to be given to the new application view.
Returns:
The descriptor for the new application view.
Throws:
DuplicateNameException - If the parent namespace already contains an object with the name given by the appViewName parameter.
NamespaceException - If any namespace access error occurs.
ApplicationViewException - If any error occurs creating the descriptor for the new application view.
java.rmi.RemoteException - If an RMI communication error occurs.

removeApplicationView

public IApplicationViewDescriptor removeApplicationView(QualifiedName name)
                                                 throws NamespaceException,
                                                        ApplicationViewException,
                                                        java.rmi.RemoteException
Removes the application view with the given qualified name from its parent namespace, and returns a descriptor for it.

Parameters:
name - The qualified name for the application view to remove.
Returns:
The descriptor for the removed application view.
Throws:
NamespaceException - If any namespace access error occurs.
ApplicationViewException - If the application view does not exist in the repository or if any error occurs removing the descriptor for the removed application view.
java.rmi.RemoteException - If an RMI communication error occurs.

updateApplicationView

public void updateApplicationView(IApplicationViewDescriptor appView)
                           throws ApplicationViewException,
                                  java.rmi.RemoteException
Updates the given ApplicationViewDescriptor within the WLAI repository. Any changes made to the ApplicationViewDescriptor since it was retrieved from the repository are persisted back into the repository.

Parameters:
appView - The ApplicationViewDescriptor representing the application view to be updated.
Throws:
ApplicationViewException - If the application view does not exist in the repository or if any error occurs updating the descriptor for the application view.
java.rmi.RemoteException - If an RMI communication error occurs.

getApplicationView

public IApplicationViewDescriptor getApplicationView(QualifiedName name)
                                              throws NamespaceException,
                                                     ApplicationViewException,
                                                     java.rmi.RemoteException
Gets the application view with the given qualified name and returns a descriptor for it. In addition, the associated ConnectionFactory descriptor is also resolved and set on the returned application view descriptor.

Parameters:
name - The qualified name for the application view to retrieved.
Returns:
The descriptor for the application view.
Throws:
NamespaceException - If the application view does not exist, or any namespace access error occurs.
ApplicationViewException - If the application view does not exist in the repository or if any error occurs retrieving the descriptor for the application view.
java.rmi.RemoteException - If an RMI communication error occurs.

exists

public boolean exists(QualifiedName aQualifiedName)
               throws ApplicationViewException,
                      java.rmi.RemoteException
Determine whether the application view represented by a qualified name exists in the repository.

Parameters:
aQualifiedName - - the qualified name of the application view to find in the repository.
Returns:
a boolean object containing true if the application view exists in the repository and false if it does not.
Throws:
ApplicationViewException - If an error occurs while examining the repository.
java.rmi.RemoteException - If an RMI communication error occurs.

deployApplicationView

public void deployApplicationView(IApplicationViewDescriptor appView,
                                  boolean allowRebind,
                                  boolean persistent)
                           throws DeploymentException,
                                  NamespaceException,
                                  java.rmi.RemoteException
Deploy the application view represented by the given descriptor into the WLAI engine. This makes the application view available for use by client applications.

Parameters:
appView - The descriptor for the application view to be deployed.
allowRebind - If true, existing deployments using the same JNDI name may be overwritten with this deployment. Otherwise, an exception is thrown if the JNDI name is already in use.
persistent - Indicates whether the server should treat this deployment as an ongoing startup deployment the next time the server starts. If false, this deployment only exists for the life of the server.
Throws:
DeploymentException - If any error occurs deploying the application view into the WLAI engine.
NamespaceException - If any namespace access error occurs.
java.rmi.RemoteException - If an RMI communication error occurs.

undeployApplicationView

public IApplicationViewDescriptor undeployApplicationView(QualifiedName name,
                                                          boolean force,
                                                          boolean persistent)
                                                   throws DeploymentException,
                                                          NamespaceException,
                                                          java.rmi.RemoteException
Undeploy the application view represented by the given QualifiedName from the WLAI engine. This makes the application view unavailable to client applications.

Parameters:
name - The qualified name of the application view to be undeployed.
force - If true, this application view will be undeployed regardless of whether any user is currently using it or not.
persistent - Indicates whether the server should remove this deployment from the ongoing startup deployments. If false, and this deployment is persistent, the application view will be removed from the current runtime deployments, but will still be deployed on startup the next time the server starts. If true, this deployment is removed from the current runtime deployments AND is removed from the ongoing startup deployments.
Returns:
The descriptor for the application view that was undeployed.
Throws:
DeploymentException - If any error occurs undeploying the application view from the WLAI engine.
NamespaceException - If any namespace access error occurs.
java.rmi.RemoteException - If an RMI communication error occurs.

getApplicationViewInstance

public ApplicationView getApplicationViewInstance(QualifiedName name)
                                           throws NamespaceException,
                                                  ApplicationViewException,
                                                  javax.naming.NamingException,
                                                  javax.ejb.CreateException,
                                                  java.rmi.RemoteException
Create a new instance of the application view with the given qualified name. An application view instance can be used to invoke services on a target application and receive events from that application.

Parameters:
name - The qualified name of the application view to retrieve an application view instance for.
Returns:
The application view instance with the qualified name given by the name parameter.
Throws:
NamespaceException - If any namespace access error occurs.
ApplicationViewException - If any error occurs finding the application view with the given name in the WLAI engine, or creating an instance of the application view.
javax.ejb.CreateException - If the application view instance could not be created.
java.rmi.RemoteException - If an RMI communication error occurs.

getApplicationViewInstance

public ApplicationView getApplicationViewInstance(QualifiedName name,
                                                  java.lang.String strInstanceID)
                                           throws NamespaceException,
                                                  ApplicationViewException,
                                                  javax.naming.NamingException,
                                                  javax.ejb.CreateException,
                                                  java.rmi.RemoteException

isApplicationViewDeployed

public boolean isApplicationViewDeployed(QualifiedName name)
                                  throws DeploymentException,
                                         NamespaceException,
                                         java.rmi.RemoteException
Indicates whether an application view with the given qualified name has been deployed within the WLAI engine.

Parameters:
name - The name of the application view to check for.
Returns:
True if the application view with the given name has been deployed, false otherwise.
Throws:
DeploymentException - If any error occurs accessing deployment information.
NamespaceException - If any namespace access error occurs.
java.rmi.RemoteException - If an RMI communication error occurs.

getAdapterInfoForApplicationView

public AdapterInfo getAdapterInfoForApplicationView(QualifiedName name)
                                             throws NamespaceException,
                                                    ApplicationViewException,
                                                    java.rmi.RemoteException
Returns information about the adapter associated with an application view with the given name.

Parameters:
name - The qualified name of the application view for which adapter info is to be returned.
Returns:
The AdapterInfo representing the adapter associated with the designated application view, or null if no adapter info could be found.
Throws:
NamespaceException - if any namespace access error occurs.
ApplicationViewException - if any error occurs accessing the application view descriptor or any other descriptor associated with it.
java.rmi.RemoteException - if an RMI communication error occurs.

WebLogic Integration

WebLogic Integration (WLI)