/*
 * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
 * This software is the proprietary information of Sun Microsystems, Inc.
 * Use is subject to license terms.
 * 
 * Copyright 2004 Sun Microsystems, Inc.  Tous droits r?serv?s.
 * Ce logiciel est propri?t? de Sun Microsystems, Inc.
 * Distribu? par des licences qui en restreignent l'utilisation.
 *
 * ident        "@(#)TestDiscoveryResponder.java 1.13     04/06/01 SMI"
 *
 */

/*
 * TestSdk.java
 *
 * Created on March 18, 2004, 11:45 AM
 */

package com.sun.mfwk.examples.discovery;

import com.sun.mfwk.discovery.*;
import java.lang.*;
import java.io.*;


// JESMF log
import java.util.logging.*;
import com.sun.mfwk.util.log.MfLogService;

public class TestDiscoveryResponder {
    
    /** Creates a new instance of TestSdk */
    public TestDiscoveryResponder() {

    }
    
    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        byte[] encryptUserDataKey = {'k','e','y','i','s','8','b','i','t'};
        // creates a log file
        MfLogService l = new MfLogService("sdk_discovery");
        
        byte[] userDataTest = new byte[]{'u','s','e','r','d','a','t','a'};
        try {
            MfDiscoveryResponder testSdk = new MfDiscoveryResponder("DiscoveryExampleCPName","Instance1","jmx://localhost:890",userDataTest);
            
            //key has to match the one in Agent Key file
            MfDiscoveryResponder testSdk2 = new MfDiscoveryResponder("DiscoveryExampleCPName","Instance2","jmx://localhost:891",userDataTest,encryptUserDataKey);
            
            //should not appear in the DiscoveryExample Module Agent Log 
            //as we filter ntifications based on product Name
            MfDiscoveryResponder testSdk3 = new MfDiscoveryResponder("CPNameNotFilteredByDiscoveryExampleModule","Instance1","jmx://localhost:892",userDataTest);

        } catch (IOException ioe) {
           ioe.printStackTrace();
        }

    }    
}
