Class DialogManager
package: net.jxta.myjxta.dialog
public abstract class DialogManager
Version:
$Id: DialogManager.java,v 1.5 2005/05/06 22:32:14 gonzo Exp $
Author:
james todd [gonzo at jxta dot org]
modified:
2005-03-27 jamoore add vojxtaDialog to dialog types
2005-04-24 jamoore add vijxtaDialog to dialog types
Field Summary
private static Map
private static Map
private static Map
   The Map that holds the available managers of DialogManager keyed by type.
 
private String
private String
Constructor Summary
public
DialogManager(String name, String type)
Method Summary
public abstract void
addPipeListener(PeerGroup pg, DialogPipeListener listener)
   Add a new DialogPipeListener
 
public static void
public static void
public static void
public abstract void
clearPipeListeners(PeerGroup pg)
public boolean
equals(Object o)
public static Commander
getCommander(Class c, Group g, JxtaBiDiPipe pipe, MyJXTA myjxta)
public static Commander
getCommander(Class c, Group g, PipeAdvertisement pa, MyJXTA myjxta)
private static Commander
public static Dialog
getDialog(Class c, Group g, JxtaBiDiPipe pipe, MyJXTA myjxta)
   Returns the Dialog associated with the specified pipe.
 
public static Dialog
getDialog(Class c, Group g, MyJXTA myjxta)
public static Dialog
getDialog(Class c, Group g, PipeAdvertisement pa, MyJXTA myjxta)
   Returns the Dialog associated with the specified pipe advertisement.
 
private static Dialog
public String
public String
public static synchronized DialogManager
getInstance(Group g, String name, String type)
   Return the instance of the DialogManager to use, given a type.
 
protected String
public abstract PipeAdvertisement
getPipeAdv(PeerGroup pg)
   Get the PipeAdvertisement for the indicated PeerGroup
 
protected String
public static void
public static void
public abstract void
removePipeListener(PeerGroup pg, DialogPipeListener listener)
   Removes a DialogPipeListener previously registered for the indicated PeerGroup
 
Field Detail
commanders
private static Map commanders = null

dialogs
private static Map dialogs = null

managers
private static Map managers = null
The Map that holds the available managers of DialogManager keyed by type. This ensures that only one instance of each DialogManager type is creaed application wide

name
private String name = null

type
private String type = null
Constructor Detail
DialogManager
public DialogManager(String name, String type)
Method Detail
addPipeListener
public abstract void addPipeListener(PeerGroup pg, DialogPipeListener listener)
Add a new DialogPipeListener
Parameters:
pg the PeerGroup in which the DialogPipeListener operates
listener the DialogPipeListener to add

clear
public static void clear(Group g)

clearCommanders
public static void clearCommanders(Group g)

clearDialogs
public static void clearDialogs(Group g)

clearPipeListeners
public abstract void clearPipeListeners(PeerGroup pg)

equals
public boolean equals(Object o)

getCommander
private static Commander getCommander(Group g, Dialog d)

getCommander
public static Commander getCommander(Class c, Group g, JxtaBiDiPipe pipe, MyJXTA myjxta)

getCommander
public static Commander getCommander(Class c, Group g, PipeAdvertisement pa, MyJXTA myjxta)

getDialog
public static Dialog getDialog(Class c, Group g, MyJXTA myjxta)

getDialog
private static Dialog getDialog(Group g, Dialog td)

getDialog
public static Dialog getDialog(Class c, Group g, PipeAdvertisement pa, MyJXTA myjxta)
Returns the Dialog associated with the specified pipe advertisement.
modified:
2005-04-24 jamoore add vijxtaDialog to dialog types

getDialog
public static Dialog getDialog(Class c, Group g, JxtaBiDiPipe pipe, MyJXTA myjxta)
Returns the Dialog associated with the specified pipe.
modified:
2005-04-24 jamoore add vijxtaDialog to dialog types

getDialogName
public String getDialogName()

getDialogType
public String getDialogType()

getInstance
public static synchronized DialogManager getInstance(Group g, String name, String type)
Return the instance of the DialogManager to use, given a type.
Parameters:
type the type of DialogManager to return
Return:
the desired type of DialogManager

getName
protected String getName()

getPipeAdv
public abstract PipeAdvertisement getPipeAdv(PeerGroup pg)
Get the PipeAdvertisement for the indicated PeerGroup
Parameters:
pg the PeerGroup for which to create the advertisment

getType
protected String getType()

removeCommander
public static void removeCommander(Group g, Commander c)

removeDialog
public static void removeDialog(Group g, Dialog d)

removePipeListener
public abstract void removePipeListener(PeerGroup pg, DialogPipeListener listener)
Removes a DialogPipeListener previously registered for the indicated PeerGroup
Parameters:
pg the PeerGroup to which the DialogPipeListener belongs
listener the listener to remove