Package railo.runtime.net.ntp

Examples of railo.runtime.net.ntp.NtpClient


     */
    public void updateTimeServer(String timeServer, Boolean useTimeServer) throws PageException {
      checkWriteAccess();
       if(useTimeServer!=null && useTimeServer.booleanValue() && !StringUtil.isEmpty(timeServer,true)) {
            try {
                new NtpClient(timeServer).getOffset();
            } catch (IOException e) {
                throw new ExpressionException("invalid timeserver (NTP) ["+timeServer+"] ");
            }
       }
       
View Full Code Here


   
    @Override
    public void reloadTimeServerOffset() {
      timeOffset=0;
        if(useTimeServer && !StringUtil.isEmpty(timeServer,true)) {
            NtpClient ntp=new NtpClient(timeServer);
            try {
                timeOffset=ntp.getOffset();
            } catch (IOException e) {
                timeOffset=0;
            }
        }
    }
View Full Code Here

TOP

Related Classes of railo.runtime.net.ntp.NtpClient

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.