Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
Copyright (c) 2013-2015 Sierra Wireless and others. All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 and Eclipse Distribution License v1.0 which accompany this distribution. The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html and the Eclipse Distribution License is available at http://www.eclipse.org/org/documents/edl-v10.html. Contributors: Sierra Wireless - initial API and implementation /
package org.eclipse.leshan.server.bootstrap;
A client configuration to be pushed by a bootstrap operation
public class BootstrapConfig {
    public Map<IntegerServerConfigservers = new HashMap<>();
    public Map<IntegerServerSecuritysecurity = new HashMap<>();

    
server configuration (object 1)
    static public class ServerConfig {
        public int shortId;
        public int lifetime = 86400;
        public int defaultMinPeriod = 1;
        public Integer defaultMaxPeriod = null;
        public Integer disableTimeout = null;
        public boolean notifIfDisabled = true;
        public BindingMode binding = .;
        @Override
        public String toString() {
            return String
                    .format("ServerConfig [shortId=%s, lifetime=%s, defaultMinPeriod=%s, defaultMaxPeriod=%s, disableTimeout=%s, notifIfDisabled=%s, binding=%s]",
                            ,
                            );
        }
    }

    
security configuration (object 0)
    static public class ServerSecurity {
        public String uri;
        public boolean bootstrapServer = false;
        public SecurityMode securityMode;
        public byte[] publicKeyOrId = new byte[] {};
        public byte[] serverPublicKeyOrId = new byte[] {};
        public byte[] secretKey = new byte[] {};
        public byte[] smsBindingKeyParam = new byte[] {};
        public byte[] smsBindingKeySecret = new byte[] {};
        public String serverSmsNumber = ""// spec says integer WTF?
        public Integer serverId;
        public int clientOldOffTime = 1;
        @Override
        public String toString() {
            return String
                    .format("ServerSecurity [uri=%s, bootstrapServer=%s, securityMode=%s, publicKeyOrId=%s, serverPublicKeyOrId=%s, secretKey=%s, smsSecurityMode=%s, smsBindingKeyParam=%s, smsBindingKeySecret=%s, serverSmsNumber=%s, serverId=%s, clientOldOffTime=%s]",
                            , Arrays.toString(),
                            Arrays.toString(), Arrays.toString(), ,
                            Arrays.toString(), Arrays.toString(), ,
                            );
        }
    }
    @Override
    public String toString() {
        return String.format("BootstrapConfig [servers=%s, security=%s]");
    }
New to GrepCode? Check out our FAQ X