Class MyJXTA
package: net.jxta.myjxta
public class MyJXTA
Implements:
net.jxta.myjxta.util.GroupListener
Version:
$Id: MyJXTA.java,v 1.27 2005/06/22 02:02:23 gonzo Exp $
Author:
james todd [gonzo at jxta dot org]
modified:
2005-03-27 jamoore add vojxta pipe registration
2005-03-27 jamoore add dialog removal of a general plugin panel
2005-04-24 jamoore add add support for viJxta - video chat service
Field Summary
private final static String
private final static URL
private final static String
private final static int
private static boolean
final static Logger
public final static String
private String
   The PreferenceManager object to use
 
private Preferences
private final static ResourceBundle
private Timer
   A Timer that allows to schedule certain tasks
 
public final static String
private View
   The UI to use to display the data
 
Constructor Summary
public
   Create a new instance of MyJxta and initializes it.
 
Method Summary
public void
   Add a dialog that should be displayed in the UI
 
public void
public void
   Add a new JxtaNode object to the displayed tree.
 
public void
addJxtaNode(JxtaNode node, boolean select)
public void
public void
public boolean
administration(String message)
public void
private void
public String
   Return the name of the peer
 
public Preferences
   Return the ShareManager instance used for file sharing
 
public View
public void
groupEvent(Group group, String status)
private void
   Initializes the MyJxta instance
 
private void
private void
initializeGroup(Group parent, String queryPrefix, String queryPostfix)
private boolean
public void
public void
joinGroup(Group group, boolean autoStart, boolean discover)
public void
joinGroup(Group group, boolean autoStart, boolean discover, boolean isInteractive)
   Part of group Lifecycle.
 
public void
public void
removeInboundFilter(Class dialogFilterClass)
public void
public void
removeOutboundFilter(Class dialogFilterClass)
public void
   Part of group Lifecycle.
 
private void
restore(Group group)
   Restore settings from previous invocation
 
private void
public void
setStatus(String status)
   Changes the status information that is displayed in the ui.
 
public void
startTimer(TimerTask task, int period)
   Starts a new timer task
 
private void
writePipeAdv(PipeAdvertisement pipeAdv, String fileName)
   Writes the given Pipe Advertisement to a file with the specified name.
 
Field Detail
administrationListener
private AdministrationListener administrationListener = null

CHARSET
private final static String CHARSET = "UTF-8"

CHIME_WARNING
private final static URL CHIME_WARNING = MyJXTA.class.getResource(CHIME_WARNING_RESOURCE)

CHIME_WARNING_RESOURCE
private final static String CHIME_WARNING_RESOURCE = "/net/jxta/myjxta/resources/audio/warning.wav"

DEFAULT_AUTOSTART
private final static int DEFAULT_AUTOSTART = 120000

environment
private static boolean environment = false

LOG
final static Logger LOG = Logger.getLogger(MyJXTA.class)

m_pluginContainer
private PluginContainer m_pluginContainer

NAME
public final static String NAME = Constants.getInstance().get(Constants.NAME)

peerName
private String peerName = null

preferencesManager
private PreferenceManager preferencesManager = null
The PreferenceManager object to use

prefs
private Preferences prefs = null

STRINGS
private final static ResourceBundle STRINGS = Resources.getStrings()

timer
private Timer timer = null
A Timer that allows to schedule certain tasks

VERSION
public final static String VERSION = NAME + " " + Constants.getInstance().get(Constants.VERSION) + " [" + Constants.getInstance().get(Constants.BUILD) + "]"

view
private View view = null
The UI to use to display the data
Constructor Detail
MyJXTA
public MyJXTA()
Create a new instance of MyJxta and initializes it. This starts the JXTA network if it was not already started
Method Detail
addDialog
public void addDialog(Dialog dialog)
Add a dialog that should be displayed in the UI
Parameters:
dialog the dialog to display

addInboundFilter
public void addInboundFilter(DialogFilter filter)

addJxtaNode
public void addJxtaNode(JxtaNode node, boolean select)

addJxtaNode
public void addJxtaNode(JxtaNode node)
Add a new JxtaNode object to the displayed tree. View takes care to not put in nodes twice
Parameters:
node the node to display

addListener
public void addListener(DialogListener listener)

addOutboundFilter
public void addOutboundFilter(DialogFilter filter)

administration
public boolean administration(String message)

destroy
public void destroy()

discover
private void discover(Group group)

getPeerName
public String getPeerName()
Return the name of the peer
Return:
the name of the peer

getPluginContainer
public PluginContainer getPluginContainer()

getPreferenceManager
public PreferenceManager getPreferenceManager()

getPreferences
public Preferences getPreferences()

getShareManager
public ShareManager getShareManager()
Return the ShareManager instance used for file sharing
Return:
the ShareManager instance used for file sharing

getView
public View getView()

groupEvent
public void groupEvent(Group group, String status)

initialize
private void initialize()
Initializes the MyJxta instance

initializeGroup
private void initializeGroup(Group parent, String queryPrefix, String queryPostfix)

initializeGroup
private void initializeGroup(Group parent)

isValid
private boolean isValid()

joinGroup
public void joinGroup(Group group)

joinGroup
public void joinGroup(Group group, boolean autoStart, boolean discover)

joinGroup
public void joinGroup(Group group, boolean autoStart, boolean discover, boolean isInteractive)
Part of group Lifecycle. Joins group. Starts group services and associated resources.
modified:
2005-04-24 jamoore added support for ViJxta

removeDialog
public void removeDialog(Dialog dialog)

removeInboundFilter
public void removeInboundFilter(Class dialogFilterClass)

removeListener
public void removeListener(DialogListener listener)

removeOutboundFilter
public void removeOutboundFilter(Class dialogFilterClass)

resignGroup
public void resignGroup(GroupNode groupNode)
Part of group Lifecycle. Resigns from group. Dismesses all group resources.
modified:
2005-04-24 jamoore added support for ViJxta

restore
private void restore(Group group)
Restore settings from previous invocation

seedGroup
private void seedGroup(Group parent)

setStatus
public void setStatus(String status)
Changes the status information that is displayed in the ui.
Parameters:
status the new status information to display

startTimer
public void startTimer(TimerTask task, int period)
Starts a new timer task
Parameters:
task the task to start
period the period between execution in minutes

writePipeAdv
private void writePipeAdv(PipeAdvertisement pipeAdv, String fileName)
Writes the given Pipe Advertisement to a file with the specified name.
Parameters:
pipeAdv the Pipe Advertisement to be written to file.
fileName the name of the file to write.