softwarecontainer  0.18.0-739e8d7 2017-05-04
softwarecontainer::SoftwareContainerAbstractInterface Class Referenceabstract
Inheritance diagram for softwarecontainer::SoftwareContainerAbstractInterface:
[legend]

Public Member Functions

virtual bool startGateways (const GatewayConfiguration &configs)=0
 Starts the Gateways by setting the gateway configurations and activating the configured gateway. More...
 
virtual std::shared_ptr< CommandJobcreateCommandJob (const std::string &command)=0
 Create a job that can run a command in a container. More...
 
virtual void shutdown (unsigned int timeout)=0
 Shot down the container with an explicit timeout. More...
 
virtual void suspend ()=0
 Suspend the container. More...
 
virtual void resume ()=0
 Resume a suspended container. More...
 
virtual bool bindMount (const std::string &pathOnHost, const std::string &pathInContainer, bool readonly=true)=0
 Should only be called on containers in state 'READY'. More...
 
virtual bool previouslyConfigured ()=0
 Indicates if gateways have been configured previously. More...
 

Detailed Description

Definition at line 31 of file softwarecontainerabstractinterface.h.

Member Function Documentation

virtual bool softwarecontainer::SoftwareContainerAbstractInterface::startGateways ( const GatewayConfiguration configs)
pure virtual

Starts the Gateways by setting the gateway configurations and activating the configured gateway.

This should only be called on containers in state 'READY'

Returns
ReturnCode::SUCCESS If configuration and activation was successful
ReturnCode::FAILURE If configuration or activation encountered a non-fatal error
Exceptions
GatewayErrorIf configuration or activation of any gateway encountered a fatal error.
InvalidOperationErrorIf called when state is not 'READY'
InvalidContainerErrorIf the container is in state 'INVALID'

Implemented in softwarecontainer::SoftwareContainer.

virtual std::shared_ptr<CommandJob> softwarecontainer::SoftwareContainerAbstractInterface::createCommandJob ( const std::string &  command)
pure virtual

Create a job that can run a command in a container.

This should only be called on containers in state 'READY'

Exceptions
InvalidOperationErrorIf called when state is not 'READY'
InvalidContainerErrorIf the container is in state 'INVALID'

Implemented in softwarecontainer::SoftwareContainer.

virtual void softwarecontainer::SoftwareContainerAbstractInterface::shutdown ( unsigned int  timeout)
pure virtual

Shot down the container with an explicit timeout.

Same as the shutdown() method, but the value passed will override any timeout value in the main configuration.

Parameters
timeoutSeconds to use for timeout

Implemented in softwarecontainer::SoftwareContainer.

virtual void softwarecontainer::SoftwareContainerAbstractInterface::suspend ( )
pure virtual

Suspend the container.

This suspends any execution inside the container until resume is called. A successful call to this method triggers a transition to state 'SUSPENDED'.

If the operation is not successful, the container state will be set to 'INVALID'. This means that this container instance should be considered broken.

Exceptions
ContainerErrorIf operation was unsuccessful
InvalidOperationErrorIf called when state is not 'READY'
InvalidContainerErrorIf the container is in state 'INVALID'

Implemented in softwarecontainer::SoftwareContainer.

virtual void softwarecontainer::SoftwareContainerAbstractInterface::resume ( )
pure virtual

Resume a suspended container.

This resumes execution of a container that was suspended. A successful call to this method will trigger a transition to state 'READY'.

If the operation is not successful, the container state will be set to 'INVALID'. This means that this container instance should be considered broken.

Exceptions
ContainerErrorIf operation was unsucessful
InvalidOperationErrorIf called when state is not 'SUSPENDED'
InvalidContainerErrorIf the container is in state 'INVALID'

Implemented in softwarecontainer::SoftwareContainer.

virtual bool softwarecontainer::SoftwareContainerAbstractInterface::bindMount ( const std::string &  pathOnHost,
const std::string &  pathInContainer,
bool  readonly = true 
)
pure virtual

Should only be called on containers in state 'READY'.

Exceptions
InvalidOperationErrorIf called when state is not 'READY'
InvalidContainerErrorIf the container is in state 'INVALID'

Implemented in softwarecontainer::SoftwareContainer.

virtual bool softwarecontainer::SoftwareContainerAbstractInterface::previouslyConfigured ( )
pure virtual

Indicates if gateways have been configured previously.

The user should use this method to check if startGateways have been called previously.

TODO: This should be removed when quick-launch is implemented

Returns
true if startGateways has been called previously, false if not

Implemented in softwarecontainer::SoftwareContainer.


The documentation for this class was generated from the following file: