コード例 #1
0
 @Override
 public void onStateChange(UaClient uaClient, ServerState oldState, ServerState newState) {
   // Called whenever the server state changes
   AggregateServerConsoleClient.printf("ServerState changed from %s to %s\n", oldState, newState);
   if (newState.equals(ServerState.Unknown))
     AggregateServerConsoleClient.println("ServerStatusError: " + uaClient.getServerStatusError());
 }
コード例 #2
0
 @Override
 public void onShutdown(
     UaClient uaClient, long secondsTillShutdown, LocalizedText shutdownReason) {
   // Called when the server state changes to Shutdown
   AggregateServerConsoleClient.printf(
       "Server shutdown in %d seconds. Reason: %s\n",
       secondsTillShutdown, shutdownReason.getText());
 }