public final class ApiSource extends java.lang.Object
A factory that provides the handle to the API and the way to setup the Remote API. Only one instance of the API exists during the lifetime of a program run; as far as a program is concerned, the API is a singleton and this factory provides the means of getting a reference to it. Classes interested in using the API can declare an object constant via the following code to make the reference available to all methods.
private final API api = ApiSource.getAPI();
|Modifier and Type||Method and Description|
Provides the handle to the API.
Initializes the Remote API.
public static API getAPI()
public static void initRemoteAPI(java.lang.String host, int port)
getAPI. Calling this method informs the factory that it should provide a remote proxy implementation. However, a socket connection is not established until
API.run()is called. In between
run(), listeners should be added.
Copyright © 2017 nintaco.com
Nintaco is free software; you can redistribute it and/or modify it under the terms of LGPLv2.1.