Coverage Report - org.mule.util.ApplicationShutdownSplashScreen
 
Classes in this File Line Coverage Branch Coverage Complexity
ApplicationShutdownSplashScreen
0%
0/8
0%
0/2
2
 
 1  
 /*
 2  
  * Copyright (c) MuleSoft, Inc.  All rights reserved.  http://www.mulesoft.com
 3  
  * The software in this package is published under the terms of the CPAL v1.0
 4  
  * license, a copy of which has been included with this distribution in the
 5  
  * LICENSE.txt file.
 6  
  */
 7  
 package org.mule.util;
 8  
 
 9  
 import org.mule.api.MuleContext;
 10  
 import org.mule.config.i18n.CoreMessages;
 11  
 
 12  
 import java.util.Date;
 13  
 
 14  0
 public class ApplicationShutdownSplashScreen extends SplashScreen
 15  
 {
 16  
     protected void doHeader(MuleContext context)
 17  
     {
 18  0
         long currentTime = System.currentTimeMillis();
 19  0
         header.add(CoreMessages.applicationShutdownNormally(context.getConfiguration().getId(), new Date()).getMessage());
 20  0
         long duration = 10;
 21  0
         if (context.getStartDate() > 0)
 22  
         {
 23  0
             duration = currentTime - context.getStartDate();
 24  
         }
 25  0
         header.add(CoreMessages.applicationWasUpForDuration(duration).getMessage());
 26  0
     }
 27  
 }
 28  
 
 29