Package com.iizix
Enum RunMode
- java.lang.Object
- java.lang.Enum<RunMode>
- com.iizix.RunMode
Enum Constant Summary
Enum Constants Enum Constant Description CLIENT
Client mode.DESIGNER
Designer mode.SERVER
Normal server mode.SERVER_DEVELOPMENT
Server in development mode.
Field Summary
Fields Modifier and Type Field Description java.lang.String
productName
The product name.
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
designerPost(java.lang.Runnable runnable)
Post a runnable for invocation at a later stage by the worker thread (or SWT thread for the Designer).static RunMode
getCurrent()
Gets the current run mode.static IWebServiceEngine
getWebServiceConfigurator()
Gets the instance of the URL / HTTP(S) configuration for the web service engine.static boolean
isAnyServerRunMode()
Check if this is the Server running in any mode: Normal or Development Mode.static boolean
isClientRunMode()
Checks if this is the Client Run Mode.static boolean
isDesignerRunMode()
Checks if this is the Designer Run Mode.static boolean
isExtendsAllowedRunMode()
Checks if this is the Designer or Server Run Development Mode allowing Extends.static boolean
isLicenseServer()
Checks if this is a License Server.static boolean
isLoadBalancingServer()
Checks if this is a Load Balancing Server.static boolean
isServerRunDevelopmentMode()
Checks if this is the Server Run Development Mode.static boolean
isServerRunMode()
Checks if this is the Server Run Mode.static void
setLicenseServerMode()
Sets this server to be a license server mode.static void
setLoadBalancingServerMode()
Sets this server to be a Load Balancing server mode.static void
setRunMode(RunMode runMode)
Assigns the run mode.static void
setRunMode(RunMode runMode, IDesignerPost poster)
Assigns the run mode.static void
setWebServiceConfigurator(IWebServiceEngine instance)
Sets the instance of the URL / HTTP(S) configuration for the web service engine.static RunMode
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static RunMode[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
Method Detail
values
public static RunMode[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (RunMode c : RunMode.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
valueOf
public static RunMode valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
getCurrent
public static RunMode getCurrent()
Gets the current run mode.- Returns:
- The current run mode.
setRunMode
public static void setRunMode(RunMode runMode)
Assigns the run mode. This can only be done by the Server, Client or Designer and should never be called otherwise.- Parameters:
runMode
- The run mode.- Throws:
java.lang.IllegalStateException
- If the run mode has been set.
setRunMode
public static void setRunMode(RunMode runMode, IDesignerPost poster)
Assigns the run mode. This can only be done by the Server, Client or Designer and should never be called otherwise.- Parameters:
runMode
- The run mode.poster
- The Designer poster.- Throws:
java.lang.IllegalStateException
- If the run mode has been set.
designerPost
public static void designerPost(java.lang.Runnable runnable)
Post a runnable for invocation at a later stage by the worker thread (or SWT thread for the Designer).- Parameters:
runnable
- The runnable.- Throws:
java.lang.NullPointerException
- If called outside of the Designer.
isClientRunMode
public static boolean isClientRunMode()
Checks if this is the Client Run Mode.- Returns:
- true if client, false otherwise.
isDesignerRunMode
public static boolean isDesignerRunMode()
Checks if this is the Designer Run Mode.- Returns:
- true if designer, false otherwise.
isServerRunMode
public static boolean isServerRunMode()
Checks if this is the Server Run Mode.- Returns:
- true if server, false otherwise.
isServerRunDevelopmentMode
public static boolean isServerRunDevelopmentMode()
Checks if this is the Server Run Development Mode.- Returns:
- true if development server, false otherwise.
isAnyServerRunMode
public static boolean isAnyServerRunMode()
Check if this is the Server running in any mode: Normal or Development Mode.- Returns:
- true if any server, false otherwise.
isExtendsAllowedRunMode
public static boolean isExtendsAllowedRunMode()
Checks if this is the Designer or Server Run Development Mode allowing Extends.- Returns:
- true if extends properties is enabled, i.e. Designer or Development Server, false otherwise.
setWebServiceConfigurator
public static void setWebServiceConfigurator(IWebServiceEngine instance)
Sets the instance of the URL / HTTP(S) configuration for the web service engine.- Parameters:
instance
- The instance.- Throws:
java.lang.IllegalStateException
- If already initiated.
getWebServiceConfigurator
public static IWebServiceEngine getWebServiceConfigurator()
Gets the instance of the URL / HTTP(S) configuration for the web service engine.- Returns:
- The instance.
isLicenseServer
public static final boolean isLicenseServer()
Checks if this is a License Server.- Returns:
- true if it's a License Server, false otherwise.
setLicenseServerMode
public static final void setLicenseServerMode()
Sets this server to be a license server mode.- Throws:
java.lang.SecurityException
- If not allowed.
isLoadBalancingServer
public static final boolean isLoadBalancingServer()
Checks if this is a Load Balancing Server.- Returns:
- true if it's a Load Balancing Server, false otherwise.
setLoadBalancingServerMode
public static final void setLoadBalancingServerMode()
Sets this server to be a Load Balancing server mode.- Throws:
java.lang.SecurityException
- If not allowed.