亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? updatecms.java

?? Java p2p程序設計2002年版
?? JAVA
?? 第 1 頁 / 共 2 頁
字號:
package com.sams.jxta.updateCMS;
// Gui Classes
import javax.swing.*;
import javax.swing.tree.*;

// standard Java classes
import java.io.*;
import java.util.*;
import java.net.*;

// JXTA classes
import net.jxta.membership.MembershipService;
import net.jxta.id.IDFactory;
import net.jxta.rendezvous.*;
import net.jxta.platform.Application;
import net.jxta.document.Advertisement;
import net.jxta.document.AdvertisementFactory;
import net.jxta.document.StructuredTextDocument;
import net.jxta.document.StructuredDocument;
import net.jxta.document.MimeMediaType;
import net.jxta.document.Document;
import java.lang.reflect.InvocationTargetException;

import net.jxta.endpoint.Message;
import net.jxta.pipe.PipeService;
import net.jxta.pipe.PipeID;
import net.jxta.pipe.OutputPipe;
import net.jxta.peergroup.PeerGroup;
import net.jxta.protocol.*;
import net.jxta.peergroup.PeerGroupFactory;
import net.jxta.id.ID;
import net.jxta.discovery.*;

import net.jxta.exception.PeerGroupException;
// For input
import net.jxta.pipe.InputPipe;
import net.jxta.peergroup.PeerGroupID;

// For feedback
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import net.jxta.share.*;
import net.jxta.share.client.*;
import net.jxta.impl.id.UUID.*;

public class UpdateCMS  implements Application{
    /**
     * This is the directory where CMS will store data
     * about shared data.
     */
    public static final String CMS_DATA_DIRNAME = "CMS_DATA";
    
    protected PeerGroup group;
    protected PeerGroup oldGroup;// used if we resign
    protected DiscoveryService disco;  // Discovery service
    protected ContentManager contentManager;
    protected MirrorLibrary mirrorGUI;
    protected String baseDir = "shareOut\\";
    //protected String shareDir = "C:\\DirShareCMS\\share";
    protected String inputDir = "shareIn\\";
    protected DefaultMutableTreeNode remoteFiles;
    protected Advertisement adv;
    protected net.jxta.impl.id.UUID.UUID appGID = new net.jxta.impl.id.UUID.UUID(0x43C41CB682064423L,
    0x798AA490FF914510L);
    public void UpdateCMS(){
        System.out.println(this.getClass().getName()+".UpdateCMS()");
    }
    public PeerGroup getPeerGroup(){
        return group;
    }
    /**
     *  Initialize the module, passing it its peer group and advertisement.
     *
     *  @param group PeerGroup this Module is started from.
     *  @param assignedID Identity of Module within group.
     *  modules can use it as a the root of their namespace to create
     *  names that are unique within the group but predictible by the
     *  same module on another peer. This is normaly the ModuleClassID
     *  which is also the name under which the module is known by other
     *  modules. For a group it is the PeerGroupID itself.
     *  @param adv The implementation advertisement for this Module.
     *  parameters under its assigned ID.
     *  @exception PeerGroupException failure to initialize this Module.
     *
     */
    public void init(PeerGroup group, ID assignedID, Advertisement implAdv) throws PeerGroupException{
        System.out.println(this.getClass().getName()+".init()");
        this.group = group;
        this.adv = implAdv;
        
        // Let's initialize the client
        
        disco = group.getDiscoveryService();
        
        CMS cms = getCMS(group);
        contentManager = cms.getContentManager();
        
        mirrorGUI = new MirrorLibrary(this);
        mirrorGUI.setVisible(true);
        
    }// End of init
      /*
       * Starts the application.
       */
    
    public int startApp(String[] args) {
        System.out.println(this.getClass().getName()+".startApp()");
        // get the cms for this group
        //Share a default Directory
        DefaultMutableTreeNode root = (DefaultMutableTreeNode)mirrorGUI.getLocalContentTreeModel().getRoot();
        remoteFiles = new DefaultMutableTreeNode("Remote");
        root.add(remoteFiles);
        
        DefaultMutableTreeNode localFiles = new DefaultMutableTreeNode("Local");
        root.add(localFiles);
        
        File base = new File(baseDir);
        if(!base.exists()){
            base.mkdir();
        }
        shareDir(base,localFiles);
        JTree tree = mirrorGUI.getLocalContentTree();
        tree.treeDidChange();
        ((DefaultTreeModel)tree.getModel()).reload() ;
        
        // Using non-event method.
        PeriodicDocSearch periodicDocSearch = new PeriodicDocSearch(2*60*1000);
        Thread thread = new Thread(periodicDocSearch);
        thread.start();
        return 0;
    }
    private void shareDir(File file,DefaultMutableTreeNode parent){
        System.out.println(file.getName()+" shareing");
        File files[] = null;
        try {
            if (file.isDirectory()){
                files = file.listFiles();
                //Share a default Directory
                for (int i = 0; i < files.length;i++){
                    if (!files[i].isDirectory()){
                        DefaultMutableTreeNode fileNode = new DefaultMutableTreeNode(files[i].getName());
                        parent.add(fileNode);
                        
                        // this is where we actually share the file
                        contentManager.share(files[i]);
                        System.out.println(files[i].getName()+" shared");
                    }else{
                        // It is a directory so add it to the list too
                        DefaultMutableTreeNode dirNode = new DefaultMutableTreeNode(file.getName());
                        parent.add(dirNode);
                        shareDir(files[i],parent);
                    }
                }// end for
            }else{
                DefaultMutableTreeNode fileNode = new DefaultMutableTreeNode(file.getName());
                parent.add(fileNode);
                
                // this is where we actually share the file
                contentManager.share(file);
                System.out.println(file.getName()+" shared");
            }
        } catch (IOException e) {
            System.out.println("ERROR: could not share ");
            e.printStackTrace();
            return;
        }
    }// end of shareDir()
    
    public void stopApp() {
    }
    /**
     * Note that this is where we create the
     * group type and credentials.
     */
    public void newGroupContext(String groupName){
       /* Future implementation
      try{
         oldGroup = group;
         GroupManager groupManager = new GroupManager(group);
         PeerGroup newGroup = groupManager.addGroup(groupName,null);
         if (newGroup == null){
            System.out.println("group is null");
            return;
         }
      }catch(Exception e){
         e.printStackTrace();
      }
        */
        
    }
    public void leaveGroup(String groupName){
       /* Future implementation
      try {
         // Resign our current identity.
         VisitorMembership membership = (VisitorMembership) group.getMembershipService();
         membership.resign();
         group = oldGroup;
      }catch( Exception e ) {
         e.printStackTrace();
      }
        */
    }
    public PeerGroupAdvertisement getPeerGroupAdvertisement() {
        return group.getPeerGroupAdvertisement();
    }
    
    
    private static Hashtable cmsSessions = new Hashtable();
    
    public static CMS getCMS(PeerGroup group) {
        // check if the cms is already started
        CMS cms = (CMS)cmsSessions.get(getShortName(group));
        
        if (null == cms) {
            // create a new cms for this peergroup

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91精品福利在线一区二区三区 | 国产精品国产馆在线真实露脸 | 日韩三级中文字幕| 国产午夜精品久久| 日日摸夜夜添夜夜添亚洲女人| 国产成人av在线影院| 一区在线播放视频| 精品粉嫩超白一线天av| 亚洲乱码一区二区三区在线观看| 久久国产福利国产秒拍| 91久久精品一区二区| 中文一区二区在线观看 | 国产欧美一区二区精品婷婷| 日韩精品欧美精品| 91麻豆蜜桃一区二区三区| 日韩女优电影在线观看| 午夜视频在线观看一区二区三区| 成人动漫一区二区在线| 国产午夜精品一区二区三区视频 | 一区二区三区精密机械公司| 成人免费视频视频| 国产日韩三级在线| 国产中文一区二区三区| 精品少妇一区二区三区视频免付费 | 久久久www免费人成精品| 日本欧美一区二区三区| 欧美日韩综合在线免费观看| 一区二区三区四区在线播放| 91碰在线视频| 亚洲尤物在线视频观看| 91精品91久久久中77777| 亚洲黄一区二区三区| 色综合色狠狠综合色| 亚洲综合在线视频| 欧美午夜精品电影| 午夜伦理一区二区| 欧美一级片在线| 极品少妇一区二区| 国产偷国产偷精品高清尤物| 成人午夜视频在线| 综合色中文字幕| 欧美性大战久久久久久久蜜臀| 一区二区三区四区五区视频在线观看| 色悠悠久久综合| 午夜精品在线视频一区| 日韩视频中午一区| 国产综合久久久久久久久久久久 | 中文字幕亚洲电影| 91精品福利视频| 日韩精品国产欧美| 日韩免费电影网站| 国产91精品入口| 亚洲精选在线视频| 欧美日韩一级片在线观看| 欧美96一区二区免费视频| www成人在线观看| 成人av高清在线| 亚洲五码中文字幕| 精品乱码亚洲一区二区不卡| 高清av一区二区| 亚洲一区视频在线| 欧美白人最猛性xxxxx69交| 成人天堂资源www在线| 亚洲成av人片一区二区| 久久先锋影音av鲁色资源网| 91免费版在线| 美女网站一区二区| 国产精品久久久久9999吃药| 精品视频全国免费看| 狠狠色狠狠色综合系列| 一区二区三区在线免费视频| 欧美一卡在线观看| 亚洲成a人v欧美综合天堂下载| 国产成人在线免费观看| 亚洲午夜精品一区二区三区他趣| 精品999在线播放| 91国产福利在线| 国产精选一区二区三区| 亚洲一区在线观看网站| 日本一区二区三区高清不卡| 欧美日韩国产高清一区二区三区| 国产91精品精华液一区二区三区 | 91成人看片片| 国产成人精品影视| 日韩经典一区二区| 亚洲啪啪综合av一区二区三区| 欧美成人三级在线| 欧美日韩免费一区二区三区视频 | 中文一区一区三区高中清不卡| 678五月天丁香亚洲综合网| 99re热这里只有精品视频| 欧美精品一级二级三级| 欧美专区在线观看一区| 粉嫩高潮美女一区二区三区| 日本成人在线不卡视频| 一片黄亚洲嫩模| 亚洲欧美日韩国产综合| 国产欧美日韩视频在线观看| 欧美成人国产一区二区| 欧美一二三区精品| 欧美精品tushy高清| 欧美撒尿777hd撒尿| 色综合天天做天天爱| jlzzjlzz国产精品久久| 国产电影一区二区三区| 国产黄色精品视频| 国产裸体歌舞团一区二区| 加勒比av一区二区| 精品亚洲成a人| 国产一区二区在线电影| 韩国精品主播一区二区在线观看| 日韩国产精品久久久| 日日噜噜夜夜狠狠视频欧美人| 亚洲精品v日韩精品| 一区二区三区资源| 一区二区三区鲁丝不卡| 一区二区三区欧美激情| 一区二区三区加勒比av| 亚洲国产精品欧美一二99| 亚洲精品国久久99热| 一区二区三区免费网站| 一片黄亚洲嫩模| 日本在线不卡一区| 久久er99精品| 国产麻豆午夜三级精品| 国产成人综合自拍| av电影天堂一区二区在线| 91在线国内视频| 欧美又粗又大又爽| 91精品国产乱码| 欧美www视频| 国产亚洲欧美中文| 亚洲视频一二三| 亚洲一区二区欧美日韩| 日韩av中文字幕一区二区 | 亚洲日本电影在线| 亚洲国产wwwccc36天堂| 免费成人美女在线观看.| 国产精品资源在线观看| 91污片在线观看| 欧美一区二区黄色| 中文字幕不卡的av| 亚洲一区二区综合| 九九精品视频在线看| 99久久er热在这里只有精品66| 精品视频色一区| 久久亚洲影视婷婷| 亚洲精品videosex极品| 奇米影视一区二区三区小说| 岛国一区二区三区| 欧美日韩国产片| 国产女主播在线一区二区| 亚洲一二三四久久| 福利一区福利二区| 欧美美女bb生活片| 国产精品免费网站在线观看| 日韩国产在线观看一区| 成人18视频日本| 日韩午夜中文字幕| 一区二区三区欧美亚洲| 国产精品自产自拍| 欧美精品在线一区二区| 国产精品成人一区二区三区夜夜夜| 亚洲国产wwwccc36天堂| 成人av在线一区二区三区| 91精品国产美女浴室洗澡无遮挡| 国产精品嫩草99a| 激情另类小说区图片区视频区| 91国偷自产一区二区三区成为亚洲经典| 日韩欧美亚洲一区二区| 一片黄亚洲嫩模| 99国产精品一区| 国产蜜臀av在线一区二区三区| 日韩黄色免费网站| 在线精品视频小说1| 国产精品久久久久久久久晋中 | 国产一区二区精品久久91| 欧美色综合网站| 综合色天天鬼久久鬼色| 国产一区二区视频在线| 日韩一级高清毛片| 亚洲福利视频一区| 在线影院国内精品| 亚洲三级在线看| 成人av网站免费| 国产精品久久久久久久蜜臀| 国产精品主播直播| 久久久久88色偷偷免费| 精品一区二区三区免费观看 | 香蕉影视欧美成人| 欧美主播一区二区三区| 亚洲乱码中文字幕综合| 91亚洲精品久久久蜜桃| 自拍偷自拍亚洲精品播放| 成人黄色免费短视频| 国产欧美一区二区精品婷婷 | 开心九九激情九九欧美日韩精美视频电影| 在线精品视频小说1| 亚洲第一成年网| 欧美日本国产一区|