⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 sanmessage.java

📁 SyncML的java实现类库 funambol公司发布的
💻 JAVA
字号:
/*
 * Copyright (C) 2006-2007 Funambol
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */

package com.funambol.syncml.spds;



/**
 * Class handling properties of a Server Alert Notification
 * Message coming from the server
 */
public class SANMessage {
    
    private String digest;
    
    private String version;
    
    private char uiMode;
    
    private char initiator;
    
    private int sessionId;
    
    private String serverId;
    
    private int numberOfSync;
    
    private SyncInfo[] syncInfo;
    
    public SANMessage() {
    }
    
    /** Creates a new instance of SANMessage */
    public SANMessage(String digest, String version, char uiMode, char initiator,
            int sessionId, String serverId, int numberOfSync, SyncInfo[] syncInfo) {
        this.digest = digest;
        this.version = version;
        this.uiMode = uiMode;
        this.initiator = initiator;
        this.sessionId = sessionId;
        this.serverId = serverId;
        this.numberOfSync = numberOfSync;
        this.syncInfo = syncInfo;
    }
    
    public String getDigest() {
        return digest;
    }
    
    public void setDigest(String digest) {
        this.digest = digest;
    }
    
    public String getVersion() {
        return version;
    }
    
    public void setVersion(String version) {
        this.version = version;
    }
    
    public char getUiMode() {
        return uiMode;
    }
    
    public void setUiMode(char uiMode) {
        this.uiMode = uiMode;
    }
    
    public char getInitiator() {
        return initiator;
    }
    
    public void setInitiator(char initiator) {
        this.initiator = initiator;
    }
    
    public int getSessionId() {
        return sessionId;
    }
    
    public void setSessionId(int sessionId) {
        this.sessionId = sessionId;
    }
    
    public String getServerId() {
        return serverId;
    }
    
    public void setServerId(String serverId) {
        this.serverId = serverId;
    }
    
    public int getNumberOfSync() {
        return numberOfSync;
    }
    
    public void setNumberOfSync(int numberOfSync) {
        this.numberOfSync = numberOfSync;
    }
    
    public SyncInfo[] getSyncInfos() {
        return syncInfo;
    }
    
    public void setSyncInfos(SyncInfo[] syncInfo) {
        this.syncInfo = syncInfo;
    }
    
    public String toString() {
        StringBuffer sb = new StringBuffer();
        sb.append("SANMessage:\n Digest:" + this.digest + "\n");
        sb.append("version: " + this.version + "\n");
        sb.append("uiMode: " + this.uiMode + "\n");
        sb.append("initiator: " + this.initiator + "\n");
        sb.append("sessionId: " + this.sessionId + "\n");
        sb.append("serverId: " + this.serverId + "\n");
        sb.append("numberOfSync: " + this.numberOfSync + "\n");
        sb.append("syncInfo; " + this.syncInfo + "\n");
        return sb.toString();
    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -