M
Miguel De Anda
I'm making a program (actually a few that need the same functionality) that
needs to be able to pick up new plugins. This particular project is an mp3
player based on the javalayer library that has two types of plugins, display
plugins and controller plugins. The display plugins will receive updates of
media that is currently playing and the controller plugins will be able to
send commands to the player. I've made simple interfaces to both plugins but
I'm not sure what the best way is to start them up.
These are a few options that I had in mind:
1) When the program starts, it will look in a folder and assume the *.class
files are plugins.
2) Have a configuration file that lists what plugins to use and possibly
where to find them.
3-10) Whatever anybody else may suggest.
I'm thinking that there will only be one instance of each plugin and if a
plugin can support multiple people, then it will handle that itself. I've
already made a controller and display plugin that runs on a particular
socket to allow for remote administration.
(I will need to read up on synchronization a bit since it may become a
problem on this application since multiple things are controlling the same
object)
needs to be able to pick up new plugins. This particular project is an mp3
player based on the javalayer library that has two types of plugins, display
plugins and controller plugins. The display plugins will receive updates of
media that is currently playing and the controller plugins will be able to
send commands to the player. I've made simple interfaces to both plugins but
I'm not sure what the best way is to start them up.
These are a few options that I had in mind:
1) When the program starts, it will look in a folder and assume the *.class
files are plugins.
2) Have a configuration file that lists what plugins to use and possibly
where to find them.
3-10) Whatever anybody else may suggest.
I'm thinking that there will only be one instance of each plugin and if a
plugin can support multiple people, then it will handle that itself. I've
already made a controller and display plugin that runs on a particular
socket to allow for remote administration.
(I will need to read up on synchronization a bit since it may become a
problem on this application since multiple things are controlling the same
object)