|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcds.aladin.PlasticManager
public class PlasticManager
Classe gérant toutes les connexions avec le hub PLASTIC (PLatform for AStronomical Tools InterCommunication) Cette classe se charge de la connexion avec le hub, et permet d'envoyer des messages au hub Le fait de faire passer tout ce qui est relatif à PLASTIC par une classe dédiée permet de passer relativement facilement d'une implémentation du protocole à une autre Les classes modifiées ou créées pour supporter PLASTIC sont les suivantes (package cds.aladin) : - Aladin : l'ajout des fonctionnalités PLASTIC est subordonné à la variable Aladin.PLASTIC_SUPPORT, qui pour le moment prend la valeur de Aladin.PROTO --> ajout d'un menu PLASTIC (variable MPLASTIC) permettant de s'inscrire/désinscrire auprès du hub (dans sous-menu SMPLASTIC) --> modif. dans méthode quit() : on se désincrit du hub avant de quitter l'appli --> modif. dans suiteInit() : mise à jour de l'état des items du sous-menu PLASTIC --> modif dans action(Event,Object) : gestion des évts inscription/désinscription --> ajout de la méthode setPlasticButtonMode() --> ajout de la méthode broadcastSelectedPlanes - Calque : --> modif. de selectAllObjectInPlans() : envoi d'un message "showObjects" lors de la sélection de tous les objets d'un plan - Localisation : --> modif. de la méthode setPos(...) pour permettre l'envoi du message pointAtCoords (cette méthode est appelée dans ViewSimple.mouseUp(Event,int,int) - PlasticManager (cette classe) : implémente l'interface PlasticListener --> gère la registration/unregistration auprès du hub PLASTIC --> gère globalement l'envoi et la réception des messages PLASTIC On récupère le singleton de cette classe via la méthode statique getSingleton(Aladin) - Select : --> ajout d'items dans le popup pour permettre le broadcast de plans --> ajout des actions correspondant à ces items - View : --> ajout d'une méthode selectSourcesByRowNumber(PlanCatalog pc, int[] rowIdx) pour sélectionner des objets d'après leur numéro d'ordre dans leur plancatalog --> modif. de setMesure() pour envoyer le message "showObjects" lors de la sélection d'une ou plusieurs sources --> ajout de getSelectedSources() --> modif. de showSource(Source o) : ajout de l'envoi du message approprié - ViewSimple : --> petite modif dans mouseUp(Event,int,int)
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface cds.aladin.AppMessagingInterface |
---|
AppMessagingInterface.AbstractMessage |
Field Summary |
---|
Fields inherited from interface cds.aladin.AppMessagingInterface |
---|
ABSTRACT_MSG_LOAD_CHARAC_FROM_URL, ABSTRACT_MSG_LOAD_FITS, ABSTRACT_MSG_LOAD_SPECTRUM_FROM_URL, ABSTRACT_MSG_LOAD_VOT_FROM_URL, ICON_URL, NO_PLASTIC, PLASTIC_CAN_TRANSMIT, PLASTIC_CONNECTED_ALONE, PLASTIC_NOT_CONNECTED |
Method Summary | |
---|---|
boolean |
broadcastImage(PlanImage pi,
java.lang.String[] recipients)
"Diffusion" du PlanCatalog à toutes les applications Plastic |
boolean |
broadcastTable(PlanCatalog pc,
java.lang.String[] recipients)
"Diffusion" du PlanCatalog à toutes les applications Plastic |
java.lang.String[] |
getAppsSupporting(AppMessagingInterface.AbstractMessage abstractMsg)
|
java.lang.Object |
getAppWithName(java.lang.String s)
|
boolean |
getPlasticTrace()
|
PlasticWidget |
getPlasticWidget()
|
java.lang.String |
getProtocolName()
|
boolean |
internalHubRunning()
|
boolean |
isRegistered()
|
java.lang.Object |
perform(java.net.URI sender,
java.net.URI message,
java.util.List args)
implémentation de l'interface PlasticListener |
boolean |
ping()
ping the hub |
void |
pointAtCoords(double ra,
double dec)
|
boolean |
register(boolean silent,
boolean launchHubIfNeeded)
Register with the plastic hub |
void |
sendHighlightObjectsMsg(Source source)
Envoie le message MSG_HIGHLIGHT_OBJECT au hub (si connecté) |
void |
sendMessageLoadCharac(java.lang.String url,
java.lang.String name,
java.util.List recipients)
|
void |
sendMessageLoadImage(java.lang.String url,
java.lang.String name,
java.util.List recipients)
|
void |
sendMessageLoadSpectrum(java.lang.String url,
java.lang.String spectrumId,
java.lang.String spectrumName,
java.util.Map metadata,
java.util.List recipients)
si recipients==null --> broadcast |
void |
sendSelectObjectsMsg()
Sends to the plastic hub the MSG_SELECT_OBJECTS message, with all currently selected sources |
void |
setPlasticTrace(boolean plasticTrace)
|
void |
setPlasticWidget(PlasticWidget widget)
|
boolean |
startInternalHub()
lancement du hub PlasKit, en interne |
void |
stopInternalHub(boolean dontAsk)
|
void |
trace(java.lang.String s)
|
boolean |
unregister()
|
boolean |
unregister(boolean force)
|
boolean |
unregister(boolean force,
boolean destroyInternalHub)
Unregister from the plastic hub |
void |
updateState()
met à jour l'état courant (connecté ou non, etc) |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public boolean register(boolean silent, boolean launchHubIfNeeded)
register
in interface AppMessagingInterface
launchHubIfNeeded
- si silent==true, on essaye automatiquement de lancer un hub s'il n'en existe pas. Sinon, on passe par une boite de dialogue de confirmation
public boolean unregister()
unregister
in interface AppMessagingInterface
public boolean unregister(boolean force)
unregister
in interface AppMessagingInterface
public boolean unregister(boolean force, boolean destroyInternalHub)
unregister
in interface AppMessagingInterface
force
- on force la désinscription
public boolean isRegistered()
isRegistered
in interface AppMessagingInterface
public boolean startInternalHub()
startInternalHub
in interface AppMessagingInterface
public void stopInternalHub(boolean dontAsk)
stopInternalHub
in interface AppMessagingInterface
public java.lang.Object getAppWithName(java.lang.String s)
getAppWithName
in interface AppMessagingInterface
public void sendMessageLoadImage(java.lang.String url, java.lang.String name, java.util.List recipients)
sendMessageLoadImage
in interface AppMessagingInterface
public void sendMessageLoadSpectrum(java.lang.String url, java.lang.String spectrumId, java.lang.String spectrumName, java.util.Map metadata, java.util.List recipients)
AppMessagingInterface
sendMessageLoadSpectrum
in interface AppMessagingInterface
public void sendMessageLoadCharac(java.lang.String url, java.lang.String name, java.util.List recipients)
sendMessageLoadCharac
in interface AppMessagingInterface
public java.lang.String[] getAppsSupporting(AppMessagingInterface.AbstractMessage abstractMsg)
getAppsSupporting
in interface AppMessagingInterface
public java.lang.String getProtocolName()
getProtocolName
in interface AppMessagingInterface
public boolean ping()
ping
in interface AppMessagingInterface
public boolean broadcastTable(PlanCatalog pc, java.lang.String[] recipients)
broadcastTable
in interface AppMessagingInterface
pc
- le PlanCatalog à broadcasterrecipients
- tableau des destinataires. Si null, on envoie à tout le mondepublic boolean broadcastImage(PlanImage pi, java.lang.String[] recipients)
broadcastImage
in interface AppMessagingInterface
pi
- le PlanImage à broadcasterrecipients
- tableau des destinataires. Si null, on envoie à tout le mondepublic void sendSelectObjectsMsg()
sendSelectObjectsMsg
in interface AppMessagingInterface
public void pointAtCoords(double ra, double dec)
pointAtCoords
in interface AppMessagingInterface
public boolean internalHubRunning()
internalHubRunning
in interface AppMessagingInterface
public void updateState()
updateState
in interface AppMessagingInterface
public void sendHighlightObjectsMsg(Source source)
sendHighlightObjectsMsg
in interface AppMessagingInterface
source
- la source à montrerView.showSource(Source)
public void setPlasticWidget(PlasticWidget widget)
setPlasticWidget
in interface AppMessagingInterface
public PlasticWidget getPlasticWidget()
getPlasticWidget
in interface AppMessagingInterface
public java.lang.Object perform(java.net.URI sender, java.net.URI message, java.util.List args)
public void trace(java.lang.String s)
trace
in interface AppMessagingInterface
public boolean getPlasticTrace()
getPlasticTrace
in interface AppMessagingInterface
public void setPlasticTrace(boolean plasticTrace)
setPlasticTrace
in interface AppMessagingInterface
plasticTrace
- The plasticTrace to set.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |