package lava.net.psyc; import lava.net.common.UNL; import lava.net.common.Value; import lava.net.common.VariableModifier; /** * **/ public interface PSYCPackage { /** * Returns the name of the package. The name should not * contain blank characters. The method should return * null or an empty String if there is no package name * that should be provided. **/ public String getPackageName() ; /** * Returns, if the application behind the package can * use the package. **/ public boolean uses() ; /** * Returns, if the application behind the package UNDERSTANDS * the package. Normally one should find this out, if the * application installs its own callback class. **/ public boolean understands() ; /** * Returns, if the package wants to get messaged about errors * on connections. **/ public boolean wantsErrors() ; /** * Returns all methods the package wants to handle, it may * return null or an empty Array, if it doesn't want to handle * any method. **/ public String[] getMethods() ; /** * Returns all variables the package wants to get messaged * if they were changed. **/ public String[] getVariables() ; /** * Called to tell the package it's responsible PSYCMessageCenter. * This method will be called while the message center * initializes the package but before the package must do some work. **/ public void registerCenter(PSYCMessageCenter center) ; /** * Called, if a method, the package wants to handle, were called. **/ public void received(UNL source, String method, String body) ; /** * Called, if a variable, the package wants to get messaged for, * were changed. **/ public void variableChanged(UNL source, VariableModifier modifier) ; /** * Called, if a connection will be resetted. **/ public void reset(UNL source) ; }