com.sas.sasserver
Class RemoteObjectCustomizerPanel

com.sas.sasserver.RemoteObjectCustomizerPanel
All Implemented Interfaces:
ContainerInterface, com.sas.awt.print.PrintableInterface, VisualInterface, com.sas.beans.CustomizerClosingInterface, com.sas.beans.PropertyChangeSource, com.sas.beans.VetoableChangeSource, com.sas.ComponentInterface, com.sas.DesignTimeDropTargetInterface, com.sas.lang.StringDataInterface, com.sas.LinkPropertiesInterface, com.sas.ModelInterface, ValidatorInterface, com.sas.ViewInterface, MultipleValueEventSourceInterface, TabFolderInterface, java.awt.image.ImageObserver, java.awt.MenuContainer, java.beans.Customizer, java.beans.PropertyChangeListener, java.io.ObjectInputValidation, java.io.Serializable, java.util.EventListener, javax.accessibility.Accessible

public abstract class RemoteObjectCustomizerPanel

RemoteObjectCustomizerPanel is a class that can serve as the base class of of a customizer panel that needs to create a connection to create remote objects. A dialog with an informational message is displayed while the createRemoteObjects method is run asynchronously.

See Also:
Serialized Form

Field Summary
protected  com.sas.rmi.Connection connection
          Connection object for remote access.
protected  com.sas.rmi.ConnectionUtility connectionUtility
          Connection utility used to display a default or busy cursor.
protected  boolean dialogAsynchronous
          Controls whether the CommandProgress dialog is run asynchronously.
protected  com.sas.collection.OrderedCollection dialogDisposeList
          Registered dialogs that require dispose being called.
protected  boolean isConnectionDesignTimeActive
          Flag which indicates if the connection is active at design time.
protected  com.sas.collection.OrderedCollection remoteObjects
          Registered RemoteBaseClient objects.
protected  com.sas.rmi.Rocf rocf
          Rocf object used for remote object creation.
 
Fields inherited from class com.sas.visuals.CustomizerPanel
bean
 
Fields inherited from class com.sas.visuals.TabFolder
RB_KEY
 
Constructor Summary
RemoteObjectCustomizerPanel(java.lang.String tabName)
          Abstract class.
 
Method Summary
protected  void connectionAlternateThreadEnding()
          Called after the thread is either completed or terminated.
protected  void connectionThreadEnding()
          Called after the thread is either completed or terminated.
protected  void createAlternateRemoteObjects()
          Creates an instance of Rocf and tests the connection.
protected  void createRemoteObjects()
          Creates an instance of Rocf and tests the connection.
protected  void createRocf()
           
 void customizerClosing()
          Called whenever the customizer is closing.
protected  void disposeRemoteObject(java.lang.Object remoteObject)
           
protected  void disposeRemoteObjects()
          Cleans up any remote objects.
static com.sas.rmi.Connection getConnection(com.sas.rmi.RemoteBaseClient rbc)
           
protected  void initializeConnection(com.sas.rmi.RemoteBaseClient rbc)
          Called on the java bean being customized to get the connection object.
protected  boolean isDesignTimeObject()
          Specifies whether or not the remote object being customized is a design time object.
protected  void registerDialog(RemoteObjectSelectorDialog dialog)
          Registers a RemoteObjectSelectorDialog.
protected  void registerRemoteBaseClient(com.sas.rmi.RemoteBaseClient rbc)
          Registers a RemoteBaseClient.
protected  void runAlternateConnectionThread()
          Called to run thread that performs remote user defined operations as defined in createAlternateRemoteObjects.
protected  void runConnectionThread()
          Called to run thread that performs remote user defined operations as defined in createRemoteObjects.
 void setObject(java.lang.Object bean)
          Called when a java bean is being set on a customizer.
 boolean wasCancelled()
          Indicates whether or not the cancel button was pressed.
 boolean wasExceptionThrown()
          Indicates whether or not an exception was thrown creating the remote objects.
 
Methods inherited from class com.sas.visuals.CustomizerPanel
getObject
 
Methods inherited from class com.sas.visuals.TabFolder
getDefaultHeight, getDefaultWidth, getExtendedBeanInfo, getTabButton, getText, propertyChange, setBackground, setDefaultHeight, setDefaultValues, setDefaultWidth, setTabButton, setText
 
Methods inherited from class com.sas.awt.Panel
remove, remove, removeAll
 
Methods inherited from class com.sas.awt.PanelContainerComponent
addNotify, clone, dragEnter, dragLeave, dragOver, drop, getContainerInterfaceSupportInfo, getErrorHandler, getInsets, getValidator, isIDEDnDDropBarrier, isIDEDnDDropTarget, isValid, removeNotify, setContainerInterfaceSupportInfo, setErrorHandler, setIDEDnDDropBarrier, setIDEDnDDropTarget, setInsets, setInsets, setValidator, superAddNotify, superGetInsets, superRemoveNotify, superSetDefaultValues
 
Methods inherited from class com.sas.awt.PanelVisualComponent
addLink, addPropertyChangeListener, addVetoableChangeListener, anyPropertyChangeListeners, attachModel, attachView, computePreferredSize, detachModel, detachView, dumpComponent, firePropertyChange, firePropertyChange, fireVetoableChange, getBackgroundColor, getBorder, getComponentDescription, getComponentSupportInfo, getEventMethod, getEventValues, getFont, getForegroundColor, getHeight, getHorizontalPosition, getLinkInfo, getMinimumSize, getModelInterface, getPageBounds, getPreferredSize, getPrePainter, getPrintOptionsPanel, getRequiredInterfaces, getVerticalPosition, getViewInterfaceSupportInfo, getVisualInterfaceSupportInfo, getWidth, initialize, initializeComponent, isDesignTime, isEnabled, isFocus, isLinked, isTransparent, isVisible, pageExists, paint, print, printFinalize, printInitialize, queryLinks, queryLinks, refresh, removeAllLinks, removeInterfaceTraps, removeLink, removePropertyChangeListener, removeVetoableChangeListener, setBackgroundColor, setBorder, setBounds, setComponentDescription, setComponentSupportInfo, setEnabled, setFocus, setFont, setForegroundColor, setHeight, setHorizontalPosition, setLinkInfo, setModelInterface, setPreferredSize, setPrePainter, setRequiredInterfaces, setTransparent, setVerticalPosition, setViewInterfaceSupportInfo, setVisible, setVisualInterfaceSupportInfo, setWidth, superGetFont, superGetMinimumSize, superGetPreferredSize, superIsEnabled, superIsVisible, superPaint, superSetBounds, superSetEnabled, superSetFont, superSetVisible, superUpdate, supportsListenerInterface, supportsRequiredInterfaces, trapInterfaceEvents, update, validateObject
 
Methods inherited from interface com.sas.awt.ContainerInterface
getComponents, getLayout, invalidate, setLayout, validate
 
Methods inherited from interface com.sas.awt.VisualInterface
computePreferredSize, getBackgroundColor, getBorder, getFont, getForegroundColor, getHeight, getHorizontalPosition, getMinimumSize, getPreferredSize, getPrePainter, getVerticalPosition, getVisualInterfaceSupportInfo, getWidth, isEnabled, isFocus, isTransparent, isVisible, setBackgroundColor, setBorder, setBounds, setEnabled, setFocus, setFont, setForegroundColor, setHeight, setHorizontalPosition, setPreferredSize, setPrePainter, setTransparent, setVerticalPosition, setVisible, setVisualInterfaceSupportInfo, setWidth, superGetFont, superGetMinimumSize, superGetPreferredSize, superIsEnabled, superIsVisible, superPaint, superSetBounds, superSetEnabled, superSetFont, superSetVisible, superUpdate
 

Field Detail

isConnectionDesignTimeActive

protected boolean isConnectionDesignTimeActive
Flag which indicates if the connection is active at design time.


connection

protected com.sas.rmi.Connection connection
Connection object for remote access.


rocf

protected com.sas.rmi.Rocf rocf
Rocf object used for remote object creation.


connectionUtility

protected com.sas.rmi.ConnectionUtility connectionUtility
Connection utility used to display a default or busy cursor.


remoteObjects

protected com.sas.collection.OrderedCollection remoteObjects
Registered RemoteBaseClient objects.


dialogAsynchronous

protected boolean dialogAsynchronous
Controls whether the CommandProgress dialog is run asynchronously.


dialogDisposeList

protected com.sas.collection.OrderedCollection dialogDisposeList
Registered dialogs that require dispose being called. Dialogs such as RemoteObjectSelectorDialog require dipose to be called so they can clean up internal state. In the case of the RemoteObjectSelectorDialog, rocf and RemoteBaseClient objects that were created need to be stopped.

Constructor Detail

RemoteObjectCustomizerPanel

public RemoteObjectCustomizerPanel(java.lang.String tabName)
Abstract class. Cannot be instantiated.

Parameters:
tabName - name displayed on tab button
Method Detail

registerDialog

protected void registerDialog(RemoteObjectSelectorDialog dialog)
Registers a RemoteObjectSelectorDialog. Any dialogs registered with this method will have the disposeRemoteObjects method called on them during the customizerClosing method.

Parameters:
dialog - the dialog to register

registerRemoteBaseClient

protected void registerRemoteBaseClient(com.sas.rmi.RemoteBaseClient rbc)
Registers a RemoteBaseClient. Any objects registered with this method will be stopped during the customizerClosing method.

Parameters:
rbc - object to register

isDesignTimeObject

protected boolean isDesignTimeObject()
Specifies whether or not the remote object being customized is a design time object.

Returns:
true if the object is a design time object, otherwise false

initializeConnection

protected void initializeConnection(com.sas.rmi.RemoteBaseClient rbc)
Called on the java bean being customized to get the connection object. This method should be overridden to perform any additional initializations.

Parameters:
rbc - the object to get the connection for

getConnection

public static final com.sas.rmi.Connection getConnection(com.sas.rmi.RemoteBaseClient rbc)

createRocf

protected void createRocf()

createRemoteObjects

protected void createRemoteObjects()
                            throws java.lang.Exception
Creates an instance of Rocf and tests the connection. This method will be run in a separate thread. This should be overridden to perform any operations or object creations using the rocf and connection objects.

Throws:
java.lang.Exception - If an error occurs when connecting to the remote host.

createAlternateRemoteObjects

protected void createAlternateRemoteObjects()
                                     throws java.lang.Exception
Creates an instance of Rocf and tests the connection. This method will be run in a separate thread. This should be overridden to perform any operations or object creations using the rocf and connection objects.

Throws:
java.lang.Exception - If an error occurs when connecting to the remote host.

disposeRemoteObjects

protected void disposeRemoteObjects()
Cleans up any remote objects. Any registered RemoteBaseClient objects and the rocf will be stopped. Additionally any registered dialogs will be disposed.

See Also:
RemoteBaseClient, registerRemoteBaseClient(com.sas.rmi.RemoteBaseClient), registerDialog(com.sas.sasserver.RemoteObjectSelectorDialog)

disposeRemoteObject

protected void disposeRemoteObject(java.lang.Object remoteObject)

connectionThreadEnding

protected void connectionThreadEnding()
Called after the thread is either completed or terminated. The thread can be terminated by clicking the cancel button or by an exception being thrown. wasCancelled or wasExceptionThrown can be queried to determine if there was a problem with the execution of the thread.

See Also:
wasCancelled, wasExceptionThrown()

connectionAlternateThreadEnding

protected void connectionAlternateThreadEnding()
Called after the thread is either completed or terminated. The thread can be terminated by clicking the cancel button or by an exception being thrown. wasCancelled or wasExceptionThrown can be queried to determine if there was a problem with the execution of the thread.

See Also:
wasCancelled, wasExceptionThrown()

runConnectionThread

protected void runConnectionThread()
Called to run thread that performs remote user defined operations as defined in createRemoteObjects. When the spawned thread is ending, whether it is ending normally or as the result of being cancelled or an exception, connectionThreadEnding will be called.

See Also:
connectionThreadEnding()

runAlternateConnectionThread

protected void runAlternateConnectionThread()
Called to run thread that performs remote user defined operations as defined in createAlternateRemoteObjects. When the spawned thread is ending, whether it is ending normally or as the result of being cancelled or an exception, connectionThreadEnding will be called.

See Also:
connectionThreadEnding()

wasCancelled

public boolean wasCancelled()
Indicates whether or not the cancel button was pressed.

Returns:
true if the progress dialog was cancelled, false otherwise

wasExceptionThrown

public boolean wasExceptionThrown()
Indicates whether or not an exception was thrown creating the remote objects.

Returns:
true if the an exception was thrown creating the remote objects, false otherwise

customizerClosing

public void customizerClosing()
Called whenever the customizer is closing. Calls disposeRemoteObjects to clean up any register objects.

Specified by:
customizerClosing in interface com.sas.beans.CustomizerClosingInterface
Overrides:
customizerClosing in class CustomizerPanel
See Also:
CustomizerPanel.customizerClosing(), disposeRemoteObjects()

setObject

public void setObject(java.lang.Object bean)
Called when a java bean is being set on a customizer. If the bean is an instanceof of com.sas.rmi.RemoteBaseClient, initializeConnection is called passing in the bean as an argument to the method.

Specified by:
setObject in interface java.beans.Customizer
Overrides:
setObject in class CustomizerPanel
Parameters:
bean - the object to customize
See Also:
Customizer.setObject(java.lang.Object)



Copyright © 2009 SAS Institute Inc. All Rights Reserved.