public abstract class ConnectedVimServiceBase
extends java.lang.Object
Example: The simplest possible extension class merely forms a connection and specifies it's own common action.
@Sample(name = "connect")
public class Connect extends ConnectedVimServiceBase {
@Action
public void action() {
System.out.println("currently connected: " + this.isConnected());
}
}
This is provided as an alternative to extending the Connection class directly.
For a very simple connected sample:
GetCurrentTime| Modifier and Type | Class and Description |
|---|---|
class |
ConnectedVimServiceBase.ConnectionException |
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
PROP_ME_NAME |
static java.lang.String |
SVC_INST_NAME |
| Constructor and Description |
|---|
ConnectedVimServiceBase() |
| Modifier and Type | Method and Description |
|---|---|
BasicConnection |
basicConnectionFromConnection(Connection original) |
Connection |
connect()
connects this object, returns itself to allow for method chaining
|
Connection |
disconnect()
disconnects this object and returns a reference to itself for method chaining
|
com.vmware.vim25.ManagedObjectReference |
getServiceInstanceReference()
Use this method to get a reference to the service instance itself.
|
void |
setConnection(Connection connect)
A method for dependency injection of the connection object.
|
void |
setHostConnection(java.lang.Boolean value) |
public static final java.lang.String PROP_ME_NAME
public static final java.lang.String SVC_INST_NAME
@Option(name="basic-connection",
required=false,
description="Turn off the use of SSO for connections. Useful for connecting to ESX or ESXi hosts.",
parameter=false)
public void setHostConnection(java.lang.Boolean value)
public com.vmware.vim25.ManagedObjectReference getServiceInstanceReference()
@Option(name="connection",
type=Connection.class)
public void setConnection(Connection connect)
connect - the connection object to use for this POJOConnection@Before public Connection connect()
public BasicConnection basicConnectionFromConnection(Connection original)
@After public Connection disconnect()