Package appeng.api.networking
Class GridServices
java.lang.Object
appeng.api.networking.GridServices
A registry of grid services to extend grid functionality.
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T extends IGridServiceProvider>
voidRegister a new grid service for use during operation, must be called during the loading phase.
-
Method Details
-
register
public static <T extends IGridServiceProvider> void register(Class<? super T> publicInterface, Class<T> implClass) Register a new grid service for use during operation, must be called during the loading phase. AE will automatically construct instances of the given implementation class by looking up a constructor. There must be a single constructor. The following constructor parameter types are allowed:- Other grid services public interfaces (see interfaces extending
IGridService
). IGrid
, which will be the grid that the service is being constructed for.
- Parameters:
publicInterface
- The public facing interface of the grid service you want to register. This class or interface will also be used to query the service from any grid viaIGrid.getService(Class)
.implClass
- The class used to construct the grid service for each grid. Must have a single constructor.
- Other grid services public interfaces (see interfaces extending
-