com.ibm.wsspi.kernel.embeddable
Interface Server.Result

Enclosing interface:
Server

public static interface Server.Result

Result of a start or stop operation. Calling Future.get() on the return result will block until the operation is complete (the server has finished starting, stopping, or the operation has failed). This can then be used to query the outcome.

This provides an integer return code, which will match those documented for command line invocation, and a Throwable, if an exception occurred while executing the command. If a Throwable is returned, it will have a translated message suitable for display to end users.

Consumers of this SPI must not implement this interface.


Method Summary
 ServerException getException()
           
 int getReturnCode()
          Check the return code value of the operation.
 boolean successful()
          Convenience method.
 

Method Detail

successful

boolean successful()
Convenience method.

Returns:
true if the operation was successful.

getReturnCode

int getReturnCode()
Check the return code value of the operation. The values will match those documented in the infocenter for command line invocation

Returns:
an integer return code value. In summary:
  • 0 for success,
  • 20 for bad arguments,
  • > 20 for other error conditions.
See Also:
Liberty profile: server command options

getException

ServerException getException()
Returns:
a ServerException with a translated message if an exception occurred while processing the operation, or null.