devplugin

## Class PluginCommunication

- java.lang.Object
- - devplugin.PluginCommunication

-     public abstract class PluginCommunication
      extends java.lang.Object

  PluginCommunication is the superclass for all classes that are granting access to a Plugin. This class should only contain public methods, that are at best self describing in name to use them with reflection from other Plugins.

  You are free to provide any access to your Plugin (not for DataServices). Provide it in that way that any Plugin using this class to connect to your Plugin can be sure not to run in any unexpected situation.

  If you are using this class to connect to another Plugin take nothing for granted, every new Plugin version of the Plugin you want to connect to can make changes to the class or even remove support for it (you can take that personally because it's really bad style to just remove functions without prior warning).

  Since:
    3.3.4
  Author:
    René Mach

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `PluginCommunication()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.String[]` | `getDiscontinuedMethodNames()` Always provide information about discountinued methods.
    `java.util.ArrayList<java.lang.Class<?>[]>` | `getMethodParametersOfDiscontinuedMethod(java.lang.String methodName)` You may want to make changes to the parameter of a method.
    `java.lang.Class<?>` | `getReturnValueOfDiscontinuedMethod(java.lang.String methodName, java.lang.Class<?>[] parameter)` You may want to make changes to the return value of a method.
    `abstract int` | `getVersion()` Always increase the version number if you make changes to this communication class.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### PluginCommunication

          public PluginCommunication()

  - ### Method Detail

    - #### getVersion

          public abstract int getVersion()

      Always increase the version number if you make changes to this communication class. Otherwise another Plugin may be expecting methods that are not present anymore.

      Returns:
        The version number of this communication class.

    - #### getDiscontinuedMethodNames

          public java.lang.String[] getDiscontinuedMethodNames()

      Always provide information about discountinued methods. You make it safer to use your communication class if you tell the using Plugin, what methods that were previously included were removed (all of them not just the ones from the last version).

      Returns:
        An array with the names of the discountinued methods or `null` if there are no discontinued methods.

    - #### getMethodParametersOfDiscontinuedMethod

          public java.util.ArrayList<java.lang.Class<?>[]> getMethodParametersOfDiscontinuedMethod(java.lang.String methodName)

      You may want to make changes to the parameter of a method. In that case always discontinue the old method and inform an accessing Plugin what method with which parameters was discontinued. Also use this if you remove a method completely.

      Parameters:
        `methodName` - The name of the method to get the parameter information.
      Returns:
        A list of arrays with the parameters of the discontinued methods.

    - #### getReturnValueOfDiscontinuedMethod

          public java.lang.Class<?> getReturnValueOfDiscontinuedMethod(java.lang.String methodName,
                                                              java.lang.Class<?>[] parameter)

      You may want to make changes to the return value of a method. In that case always discontinue the old method and inform an accessing Plugin what method with which return value was discontinued. Also use this if you remove a method completely.

      Parameters:
        `methodName` - The name of the method to get the return value type information.
        `parameter` - An array with the parameters of the discontinued method to get the return value for.
      Returns:
        A Class of the return value type.

TV-Browser 3.4.3, Copyright (C) 2004-2008 TV-Browser Team (dev@tvbrowser.org)