|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.ObjectpluginCore.CoreHandler
public class CoreHandler
The core handler provides a controlled interface that is handed to the plug-ins to allow them communication with the main core. All calls that are made by plug-ins are run through the CoreHandeler.
| Field Summary | |
|---|---|
private Plugin |
myPlugin
The plug-in that this CoreHandeler is associated with. |
private PluginCore |
runningCore
The pointer to the active PluginCore. |
| Constructor Summary | |
|---|---|
CoreHandler(PluginCore coreIn,
Plugin plugIn)
Initializes the CoreHandeler |
|
| Method Summary | |
|---|---|
boolean |
isLocked(int id)
Checks if a plugin has a unstable lock held on it. |
String[] |
listLoadedPlugins()
Lists the plug-ins that are currently loaded in the system. |
int |
loadPlugin(String plugin)
Loads a new plug-in into the system and starts its thread running. |
int |
loadPlugin(String plugin,
Object[] state)
Loads a new plug-in into the system and initalizes it with the data from a previous plugin, that is contained in the stateIn array. |
int |
pluginIDRequest(String plugin)
Gets the Id of a plug-in, this ID can then be used to send messages to that plug-in. |
int |
postMessage(Message messIn)
Requests that the core send the message 'messIn' to the plug-in with the same Id as the destID field in the Message object. |
Object[] |
savePlugin(int pluginId)
|
void |
shutdown()
Stops the system running, first calls the 'shutdown()' call for all loaded plug-ins then calls a join() on them before finally 'exiting itself. |
boolean |
unloadPlugin(int plugId)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private PluginCore runningCore
private Plugin myPlugin
| Constructor Detail |
|---|
public CoreHandler(PluginCore coreIn,
Plugin plugIn)
coreIn - A pointer to the running core.| Method Detail |
|---|
public boolean isLocked(int id)
id - The id of the plugin to ckeck.
public int pluginIDRequest(String plugin)
plugin - The name of the plugin you are looking for, the PluginCore checks the field Plug-in.pluginName.
public int loadPlugin(String plugin)
plugin - The full name of the object that you wish to load into the system.
public int loadPlugin(String plugin,
Object[] state)
pluginName - The full name of the object that you wish to load into the
system.
public boolean unloadPlugin(int plugId)
public void shutdown()
public String[] listLoadedPlugins()
public Object[] savePlugin(int pluginId)
public int postMessage(Message messIn)
messIn - The message to be sent.
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||