Extension SDK 10.1.2

oracle.jdeveloper.runner
Class EmbeddedServerCallback

java.lang.Object
  extended byoracle.jdeveloper.runner.EmbeddedServerCallback

public abstract class EmbeddedServerCallback
extends java.lang.Object

Class used by JDeveloper to callback code containing Node-specific customizations for embedded server behavior.


Constructor Summary
EmbeddedServerCallback()
           
 
Method Summary
 void choiceSelected(int index)
          If the callback has overridden getNumberOfChoices and getDisplayableForChoice(int), JDeveloper will call this method with the selected index immediately after the user has chosen an item.
 Displayable getDisplayableForChoice(int index)
          If the callback returned greater-than-zero from getNumberOfChoices, JDeveloper will call this method with indexes from 0 to N-1.
 int getNumberOfChoices()
          If the callback returns greater-than-zero from this method, JDeveloper will call getDisplayableForChoice(int) with indexes from 0 to N-1.
 java.lang.String getTargetURLContextRoot()
          Allows the callback to override the context root in the target URL.
 java.lang.String getTargetURLHost()
          Allows the callback to override the hostname in the target URL.
 java.lang.String getTargetURLPath()
          Allows the callback to override the path part of the URL that follows the context root.
 int getTargetURLPort()
          Allows the callback to override the port in the target URL.
 java.lang.String getTargetURLProtocol()
          Allows the callback to override the protocol of the target URL.
 java.lang.String getTargetURLQuery()
          Allows the callback to specify the query part of the URL.
 java.lang.String getTargetURLRef()
          Allows the callback to specify the ref part of the URL.
 java.lang.String getTargetURLUserInfo()
          Allows the callback to specify the userinfo part of the target URL.
 boolean isOverridingTargetURL()
          If the callback returns true from this method, JDeveloper will call all of the getTargetURL* methods to get all the parts of the overridden URL.
 void postInitEmbeddedServer(boolean isNewServerProcess)
          Called when the server initialization is complete.
 boolean preferHotDeploy(java.util.List reasonsWhyNot)
          This method allows an extension to indicate whether or not hot deployment should be attempted.
 boolean preventBrowser()
          If the callback returns true from this method, JDeveloper will not launch a browser.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EmbeddedServerCallback

public EmbeddedServerCallback()
Method Detail

getNumberOfChoices

public int getNumberOfChoices()
If the callback returns greater-than-zero from this method, JDeveloper will call getDisplayableForChoice(int) with indexes from 0 to N-1. JDeveloper will display each choice as a menu item on the run/debug submenu (or as items in a list in a dialog box) to let the user choose.

See Also:
getDisplayableForChoice(int), choiceSelected(int)

getDisplayableForChoice

public Displayable getDisplayableForChoice(int index)
If the callback returned greater-than-zero from getNumberOfChoices, JDeveloper will call this method with indexes from 0 to N-1. JDeveloper will display each choice as a menu item on the run/debug submenu (or as items in a list in a dialog box) to let the user choose. After the user has chosen an item, JDeveloper will immediately call choiceSelected(int) with the index of the item the user has chosen.

See Also:
getNumberOfChoices(), choiceSelected(int)

choiceSelected

public void choiceSelected(int index)
If the callback has overridden getNumberOfChoices and getDisplayableForChoice(int), JDeveloper will call this method with the selected index immediately after the user has chosen an item. Note that this method will be called before the embedded server has been started. Therefore, the callback should wait until postInitEmbeddedServer is called to invoke any client application.

See Also:
getNumberOfChoices(), getDisplayableForChoice(int)

preventBrowser

public boolean preventBrowser()
If the callback returns true from this method, JDeveloper will not launch a browser.


isOverridingTargetURL

public boolean isOverridingTargetURL()
If the callback returns true from this method, JDeveloper will call all of the getTargetURL* methods to get all the parts of the overridden URL. If this method returns false, JDeveloper will not call any of the getTargetURL* methods of this callback instance and proceed to search for another callback registered for the target Node type.

The default return value is false.


getTargetURLProtocol

public java.lang.String getTargetURLProtocol()
Allows the callback to override the protocol of the target URL. If null, the protocol will be determined by JDeveloper.


getTargetURLUserInfo

public java.lang.String getTargetURLUserInfo()
Allows the callback to specify the userinfo part of the target URL. JDeveloper uses null by default.


getTargetURLHost

public java.lang.String getTargetURLHost()
Allows the callback to override the hostname in the target URL. If null, the hostname will be determined by JDeveloper.


getTargetURLPort

public int getTargetURLPort()
Allows the callback to override the port in the target URL. If less than 0, the port will be determined by JDeveloper.


getTargetURLContextRoot

public java.lang.String getTargetURLContextRoot()
Allows the callback to override the context root in the target URL. If null, JDeveloper will derive the context root from the project's settings.


getTargetURLPath

public java.lang.String getTargetURLPath()
Allows the callback to override the path part of the URL that follows the context root. If null, JDeveloper will generate a path that is relative to the project's HTML root directory.


getTargetURLQuery

public java.lang.String getTargetURLQuery()
Allows the callback to specify the query part of the URL. JDeveloper uses null by default.


getTargetURLRef

public java.lang.String getTargetURLRef()
Allows the callback to specify the ref part of the URL. JDeveloper uses null by default.


preferHotDeploy

public boolean preferHotDeploy(java.util.List reasonsWhyNot)
This method allows an extension to indicate whether or not hot deployment should be attempted.

Parameters:
reasonsWhyNot - If the return value is false, the method optionally may append reasons why hot deployment cannot be used. These messages will be displayed to the user in the log window, one line per item in the reasons List. The specified List will always be non-null.
Returns:
true if hot deployment can be used; false if JDeveloper must shutdown the server and restart it instead. Note that a return value of true doesn't guarantee that hot deployment will be used, because another extension or the built-in starter logic may find a reason that the server must instead be shutdown and restarted.

postInitEmbeddedServer

public void postInitEmbeddedServer(boolean isNewServerProcess)
Called when the server initialization is complete. This method will be called both for a new server process and for hot deployment.

Parameters:
isNewServerProcess - If true, the server process is new. If false, the server has just been reconfigured using hot deployment.

Extension SDK

 

Copyright © 1997, 2004, Oracle. All rights reserved.