All Packages Class Hierarchy This Package Previous Next Index
Class lava.net.psyc.packages.Skeleton
java.lang.Object
|
+----lava.net.psyc.packages.Skeleton
- public class Skeleton
- extends Object
- implements PSYCPackage
-
center
- The PSYCMessageCenter the package is connected to.
This is initialized by the registerCenter method, which
is called within the initialization process.
-
Skeleton()
-
-
addPackageMethod(String, String[], boolean)
-
-
addPackageVariable(String, String[], boolean)
-
-
getMethods()
- 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.
Default: Return a list of methods described in PackageMethods.
-
getPackageName()
- Returns the name of the package.
-
getVariables()
- Returns all variables the package wants to get messaged
if they were changed.
Default: Return a list of methods described in PackageVariables.
-
received(UNL, String, String)
- Called, if a method, the package wants to handle, were called.
-
registerCenter(PSYCMessageCenter)
- Called to tell the package it's responsible PSYCMessageCenter.
-
reset(UNL)
- Called, if a connection will be resetted.
-
setPackageName(String)
-
-
setPackageVersion(int, int)
-
-
understands()
- Returns, if the application behind the package UNDERSTANDS
the package.
-
uses()
- Returns, if the application behind the package can
use the package.
Default: The application cannot use the package.
Override this in subclasses if needed.
-
variableChanged(UNL, VariableModifier)
- Called, if a variable, the package wants to get messaged for,
were changed.
-
wantsErrors()
- Returns, if the package wants to get messaged about errors
on connections.
center
protected PSYCMessageCenter center
- The PSYCMessageCenter the package is connected to.
This is initialized by the registerCenter method, which
is called within the initialization process.
Skeleton
public Skeleton()
setPackageName
protected void setPackageName(String name)
setPackageVersion
protected void setPackageVersion(int major,
int minor)
addPackageMethod
protected void addPackageMethod(String name,
String aliases[],
boolean handle)
addPackageVariable
protected void addPackageVariable(String name,
String aliases[],
boolean getMessaged)
getPackageName
public String getPackageName()
- 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.
Default: Returns null, if there is no PackageName given,
else it returns the name and the version of the package.
uses
public boolean uses()
- Returns, if the application behind the package can
use the package.
Default: The application cannot use the package.
Override this in subclasses if needed.
understands
public boolean understands()
- Returns, if the application behind the package UNDERSTANDS
the package. Normally one should find this out, if the
application installs its own callback class.
Default: The application cannot understand the package.
Override this in subclasses if needed.
wantsErrors
public boolean wantsErrors()
- Returns, if the package wants to get messaged about errors
on connections.
Default: The does not want errors.
Override this in subclasses if needed.
getMethods
public String[] getMethods()
- 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.
Default: Return a list of methods described in PackageMethods.
getVariables
public String[] getVariables()
- Returns all variables the package wants to get messaged
if they were changed.
Default: Return a list of methods described in PackageVariables.
registerCenter
public void registerCenter(PSYCMessageCenter center)
- Called to tell the package it's responsible PSYCMessageCenter.
This method will be called sometimes while the message center
initializes the package but before the package must do some work.
received
public void received(UNL source,
String method,
String body)
- Called, if a method, the package wants to handle, were called.
Default: It does nothing.
Override this in subclasses if needed.
variableChanged
public void variableChanged(UNL source,
VariableModifier modifier)
- Called, if a variable, the package wants to get messaged for,
were changed.
Default: It does nothing.
Override this in subclasses if needed.
reset
public void reset(UNL source)
- Called, if a connection will be resetted.
Default: It does nothing.
Override this in subclasses if needed.
All Packages Class Hierarchy This Package Previous Next Index