de.espirit.firstspirit.module
Interface Service<T>

All Superinterfaces:
Component<ServiceDescriptor,ServerEnvironment>

public interface Service<T>
extends Component<ServiceDescriptor,ServerEnvironment>

FIRSTspirit service interface. Implementing classes must have a no-arg constructor.

Since:
4.1

Method Summary
 Class<? extends ServiceProxy> getProxyClass()
          A service proxy is an optional, client-side service implementation.
 Class<? extends T> getServiceInterface()
          Returns the service interface.
 boolean isRunning()
          Returns whether the service is running.
 void start()
          Starts the service.
 void stop()
          Stops the service.
 
Methods inherited from interface de.espirit.firstspirit.module.Component
init, installed, uninstalling, updated
 

Method Detail

start

void start()
Starts the service.

Since:
4.1

stop

void stop()
Stops the service.

Since:
4.1

isRunning

boolean isRunning()
Returns whether the service is running.

Returns:
true if the service is running.
Since:
4.1

getServiceInterface

@Nullable
Class<? extends T> getServiceInterface()
Returns the service interface. Only methods of this interface are accessible, so Service instances must also implement this interface.

Returns:
service interface class.
Since:
4.1

getProxyClass

@Nullable
Class<? extends ServiceProxy> getProxyClass()
A service proxy is an optional, client-side service implementation. It will be instantiated, initialized and returned by Connection.getService(String). The proxy class must have a no-arg constructor and must implement the ServiceProxy interface, but has not to implement the service-interface itself.

Returns:
service proxy class or null if no proxy is provided.
Since:
4.1


Copyright © 2012 e-Spirit AG. All Rights Reserved. Build 4.2.480