org.eclipse.ecf.remoteservices.ui
Class MethodInvocationDialog

java.lang.Object
  extended by org.eclipse.jface.window.Window
      extended by org.eclipse.jface.dialogs.Dialog
          extended by org.eclipse.ecf.remoteservices.ui.MethodInvocationDialog
All Implemented Interfaces:
org.eclipse.jface.window.IShellProvider

public final class MethodInvocationDialog
extends org.eclipse.jface.dialogs.Dialog

The MethodInvocationDialog allows a user to select a method given a java.lang.Class to invoke and communicate with a remote service.

Since:
2.0

Nested Class Summary
 
Nested classes/interfaces inherited from class org.eclipse.jface.window.Window
org.eclipse.jface.window.Window.IExceptionHandler
 
Field Summary
static int ASYNC_FIRE_AND_GO
          An integer constant that corresponds to the "Async Fire-and-Go" selection.
static int ASYNC_FUTURE_RESULT
          An integer constant that corresponds to the "Async Future Result" selection.
static int ASYNC_LISTENER
          An integer constant that corresponds to the "Async Listener" selection.
static int OSGI_SERVICE_PROXY
          An integer constant that corresponds to the "OSGi Service Proxy" selection.
static int REMOTE_SERVICE_PROXY
          An integer constant that corresponds to the "Remote Service Proxy" selection.
static int SYNCHRONOUS
          An integer constant that corresponds to the "Synchronous" selection.
 
Fields inherited from class org.eclipse.jface.dialogs.Dialog
blockedHandler, buttonBar, DIALOG_DEFAULT_BOUNDS, DIALOG_PERSISTLOCATION, DIALOG_PERSISTSIZE, dialogArea, DLG_IMG_ERROR, DLG_IMG_HELP, DLG_IMG_INFO, DLG_IMG_MESSAGE_ERROR, DLG_IMG_MESSAGE_INFO, DLG_IMG_MESSAGE_WARNING, DLG_IMG_QUESTION, DLG_IMG_WARNING, ELLIPSIS
 
Fields inherited from class org.eclipse.jface.window.Window
CANCEL, OK
 
Constructor Summary
MethodInvocationDialog(org.eclipse.jface.window.IShellProvider parentShell, java.lang.Class cls)
          Creates a new MethodInvocationDialog on top of the specified shell provider.
MethodInvocationDialog(org.eclipse.swt.widgets.Shell parentShell, java.lang.Class cls)
          Creates a new MethodInvocationDialog over the provided shell.
 
Method Summary
protected  void configureShell(org.eclipse.swt.widgets.Shell newShell)
           
 void create()
           
protected  org.eclipse.swt.widgets.Control createDialogArea(org.eclipse.swt.widgets.Composite parent)
           
 int getInvocationType()
          Returns the type of invocation that should be used to call the selected method to communicate with a remote service.
 java.lang.reflect.Method getMethod()
          Returns the method that has been selected by the user.
 java.lang.Object[] getMethodArguments()
          Returns the arguments that has been specified by the user to pass to the method.
 int getTimeout()
          Retrieves the timeout value that has been specified by the user.
protected  void okPressed()
           
 
Methods inherited from class org.eclipse.jface.dialogs.Dialog
applyDialogFont, buttonPressed, cancelPressed, close, convertHeightInCharsToPixels, convertHeightInCharsToPixels, convertHorizontalDLUsToPixels, convertHorizontalDLUsToPixels, convertVerticalDLUsToPixels, convertVerticalDLUsToPixels, convertWidthInCharsToPixels, convertWidthInCharsToPixels, createButton, createButtonBar, createButtonsForButtonBar, createContents, dialogFontIsDefault, getBlockedHandler, getButton, getButtonBar, getCancelButton, getDialogArea, getDialogBoundsSettings, getDialogBoundsStrategy, getImage, getInitialLocation, getInitialSize, getOKButton, initializeBounds, initializeDialogUnits, isResizable, setBlockedHandler, setButtonLayoutData, setButtonLayoutFormData, shortenText
 
Methods inherited from class org.eclipse.jface.window.Window
canHandleShellCloseEvent, constrainShellSize, createShell, getConstrainedShellBounds, getContents, getDefaultImage, getDefaultImages, getDefaultOrientation, getLayout, getParentShell, getReturnCode, getShell, getShellListener, getShellStyle, getWindowManager, handleFontChange, handleShellCloseEvent, open, setBlockOnOpen, setDefaultImage, setDefaultImages, setDefaultModalParent, setDefaultOrientation, setExceptionHandler, setParentShell, setReturnCode, setShellStyle, setWindowManager
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ASYNC_LISTENER

public static final int ASYNC_LISTENER
An integer constant that corresponds to the "Async Listener" selection.

See Also:
getInvocationType(), Constant Field Values

ASYNC_FUTURE_RESULT

public static final int ASYNC_FUTURE_RESULT
An integer constant that corresponds to the "Async Future Result" selection.

See Also:
getInvocationType(), Constant Field Values

ASYNC_FIRE_AND_GO

public static final int ASYNC_FIRE_AND_GO
An integer constant that corresponds to the "Async Fire-and-Go" selection.

See Also:
getInvocationType(), Constant Field Values

OSGI_SERVICE_PROXY

public static final int OSGI_SERVICE_PROXY
An integer constant that corresponds to the "OSGi Service Proxy" selection.

See Also:
getInvocationType(), Constant Field Values

REMOTE_SERVICE_PROXY

public static final int REMOTE_SERVICE_PROXY
An integer constant that corresponds to the "Remote Service Proxy" selection.

See Also:
getInvocationType(), Constant Field Values

SYNCHRONOUS

public static final int SYNCHRONOUS
An integer constant that corresponds to the "Synchronous" selection.

See Also:
getInvocationType(), Constant Field Values
Constructor Detail

MethodInvocationDialog

public MethodInvocationDialog(org.eclipse.jface.window.IShellProvider parentShell,
                              java.lang.Class cls)
Creates a new MethodInvocationDialog on top of the specified shell provider.

Parameters:
parentShell - the provider to return the parent shell of this dialog
cls - the class to select the methods from

MethodInvocationDialog

public MethodInvocationDialog(org.eclipse.swt.widgets.Shell parentShell,
                              java.lang.Class cls)
Creates a new MethodInvocationDialog over the provided shell.

Parameters:
parentShell - the parent shell
cls - the class to select the methods from
Method Detail

configureShell

protected void configureShell(org.eclipse.swt.widgets.Shell newShell)
Overrides:
configureShell in class org.eclipse.jface.window.Window

createDialogArea

protected org.eclipse.swt.widgets.Control createDialogArea(org.eclipse.swt.widgets.Composite parent)
Overrides:
createDialogArea in class org.eclipse.jface.dialogs.Dialog

create

public void create()
Overrides:
create in class org.eclipse.jface.dialogs.Dialog

okPressed

protected void okPressed()
Overrides:
okPressed in class org.eclipse.jface.dialogs.Dialog

getMethod

public java.lang.reflect.Method getMethod()
Returns the method that has been selected by the user.

Returns:
the selected method

getMethodArguments

public java.lang.Object[] getMethodArguments()
Returns the arguments that has been specified by the user to pass to the method.

Returns:
the list of arguments to pass into the method

getTimeout

public int getTimeout()
Retrieves the timeout value that has been specified by the user. This value is in milliseconds.

Returns:
the timeout valued specified by the user in milliseconds

getInvocationType

public int getInvocationType()
Returns the type of invocation that should be used to call the selected method to communicate with a remote service.

Returns:
the invocation type selected by the user
See Also:
ASYNC_LISTENER, ASYNC_FUTURE_RESULT, ASYNC_FIRE_AND_GO, OSGI_SERVICE_PROXY, REMOTE_SERVICE_PROXY, SYNCHRONOUS