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

Variable Index

 o center
The PSYCMessageCenter the package is connected to.
This is initialized by the registerCenter method, which is called within the initialization process.

Constructor Index

 o Skeleton()

Method Index

 o addPackageMethod(String, String[], boolean)
 o addPackageVariable(String, String[], boolean)
 o 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.
 o getPackageName()
Returns the name of the package.
 o getVariables()
Returns all variables the package wants to get messaged if they were changed.
Default: Return a list of methods described in PackageVariables.
 o received(UNL, String, String)
Called, if a method, the package wants to handle, were called.
 o registerCenter(PSYCMessageCenter)
Called to tell the package it's responsible PSYCMessageCenter.
 o reset(UNL)
Called, if a connection will be resetted.
 o setPackageName(String)
 o setPackageVersion(int, int)
 o understands()
Returns, if the application behind the package UNDERSTANDS the package.
 o 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.
 o variableChanged(UNL, VariableModifier)
Called, if a variable, the package wants to get messaged for, were changed.
 o wantsErrors()
Returns, if the package wants to get messaged about errors on connections.

Variables

 o 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.

Constructors

 o Skeleton
 public Skeleton()

Methods

 o setPackageName
 protected void setPackageName(String name)
 o setPackageVersion
 protected void setPackageVersion(int major,
                                  int minor)
 o addPackageMethod
 protected void addPackageMethod(String name,
                                 String aliases[],
                                 boolean handle)
 o addPackageVariable
 protected void addPackageVariable(String name,
                                   String aliases[],
                                   boolean getMessaged)
 o 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.

 o 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.

 o 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.

 o 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.

 o 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.

 o 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.

 o 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.

 o 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.

 o 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.

 o 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