|
7 | 7 | import com.openfin.desktop.animation.OpacityTransition; |
8 | 8 | import com.openfin.desktop.animation.PositionTransition; |
9 | 9 | import com.openfin.desktop.channel.ChannelAction; |
| 10 | +import com.openfin.desktop.channel.ChannelListener; |
10 | 11 | import com.openfin.desktop.channel.ChannelProvider; |
11 | 12 |
|
| 13 | +import com.openfin.desktop.channel.ConnectionEvent; |
12 | 14 | import info.clearthought.layout.TableLayout; |
13 | 15 |
|
14 | 16 | import javax.swing.*; |
@@ -422,6 +424,17 @@ public void actionPerformed(ActionEvent e) { |
422 | 424 | // see below |
423 | 425 | tbProvider.setEnabled(false); |
424 | 426 |
|
| 427 | + desktopConnection.getChannel(channelName).addChannelListener(new ChannelListener() { |
| 428 | + @Override |
| 429 | + public void onChannelConnect(ConnectionEvent connectionEvent) { |
| 430 | + logger.info(String.format("provider receives channel connect event from %s ", connectionEvent.getUuid())); |
| 431 | + } |
| 432 | + @Override |
| 433 | + public void onChannelDisconnect(ConnectionEvent connectionEvent) { |
| 434 | + logger.info(String.format("provider receives channel disconnect event from %s ", connectionEvent.getUuid())); |
| 435 | + } |
| 436 | + }); |
| 437 | + |
425 | 438 | desktopConnection.getChannel(channelName).create(new AsyncCallback<ChannelProvider>() { |
426 | 439 | @Override |
427 | 440 | public void onSuccess(ChannelProvider provider) { |
@@ -711,7 +724,7 @@ private void createAdminApplication() throws DesktopException { |
711 | 724 | updateMessagePanel("Creating InterAppBus"); |
712 | 725 | bus = desktopConnection.getInterApplicationBus(); |
713 | 726 | openfinSystem = new System(desktopConnection); |
714 | | - updateMessagePanel("Connected to Desktop"); |
| 727 | + updateMessagePanel("Connected to Runtime"); |
715 | 728 | setMainButtonsEnabled(true); |
716 | 729 |
|
717 | 730 | openfinSystem.addEventListener("desktop-icon-clicked", new EventListener() { |
|
0 commit comments