Extending the Java Service Layer

You can add new Java services to the service layer. The Java services you add can perform any of the functions of a typical Java Web service.
The Java services you add to the Java service layer are used to retrieve data from the vSphere environment and display the data in the user interface layer, or to make changes to the vSphere environment in response to actions in the user interface layer.

Getting Data from the vSphere Environment

Service plug-in modules that gather data from the vSphere environment usually extend the native services on the
and the
vSphere Web Client
application servers, such as the Data Service. You can create standalone custom Java services for data gathering, but a best practice is to extend the built-in services in the
vSphere Web Client
SDK. Extensions to the built-in services in the
vSphere Web Client
SDK are often simple wrappers around existing Java services that you create.
In general, you must extend the Data Service if your extension solution meets any of the following criteria.
  • Your extension provides new data about existing vSphere objects. If your extension provides a GUI element to display data that the
    or the
    vSphere Web Client
    services do not already provide, you must extend the Data Service to provide such data.
  • You want to add a new type of object to the vSphere environment. If you are adding a new type of object to the vSphere environment, you can extend the Data Service to provide data for objects of the new type.
The service extensions you create can access data from any source, either inside or outside of the vSphere environment. For example, you can create an extension to the Data Service that retrieves data from an external Web server, rather than from
vCenter Server
.

Making Changes to the vSphere Environment

Service plug-in modules that make changes to the vSphere environment are standalone Java services that you create. These services are used when the user starts an action in the
or the
vSphere Web Client
user interfaces. If you create an action extension, you must also create the Java service that performs the action operation on the vSphere environment as a service plug-in module.