![]() ![]() |
![]() |
File: [Pegasus] / pegasus-JavaCIMClient / cimclient / tests / IndTests / IndConsumer.java
(download)
Revision: 1.2, Thu Feb 12 18:12:28 2004 UTC (20 years, 4 months ago) by kumpf Branch: MAIN CVS Tags: pegasus25BeforeLicenseUpdate, SLPPERFINST-root, SLPPERFINST-branch, RELEASE_2_4_FC_CANDIDATE_1, RELEASE_2_4_1-BETA3, RELEASE_2_4_1-BETA2, RELEASE_2_4_1-BETA1, RELEASE_2_4_1, RELEASE_2_4_0-RC3, RELEASE_2_4_0-RC2, RELEASE_2_4_0, RELEASE_2_4-root, RELEASE_2_4-branch, PEP217_PRE_BRANCH, PEP217_POST_BRANCH, PEP217_BRANCH, PEP214ROOT, PEP214BRANCH, PEP214-root, PEP214-branch, PEP213_SIZE_OPTIMIZATIONS, PEP-214B-root, PEG25_IBM_5_16_05, MONITOR_CONSOLIDATION_2_5_BRANCH, IBM_241_April1405, HPUX_TEST, HEAD, CQL_2_5_BRANCH, CHUNKTESTDONE_PEP140, BUG2493_BINREP-root, BUG2493_BINREP-branch Changes since 1.1: +30 -63 lines HP-BAPU: PEP125 Enhancements to Pegasus Java Client and Java Listener |
// IndConsumer.java // // The contents of this file are subject to the SNIA Public License Version 1.0 // (the "License"); you may not use this file except in compliance with the // License. You may obtain a copy of the License at // // http://www.snia.org/resources/openSource.html // // Software distributed under the License is distributed on an "AS IS" basis, // WITHOUT WARRANTY OF ANY KIND, either express or implied. See the // License for the specific language governing rights and limitations // under the License. // // The Initial Developers of the Original Code are Frank Piorko and // David Simons // // Contributor(s): // Bapu Patil ( bapu_patil@hp.com) // Hewlett-Packard Company. // // /** IndConsumer.java This is a test program to receive Indications sent by Indication clients. This program start the CIM Indication Listener on port 8189. */ package tests.IndTests; import org.snia.wbem.client.*; import org.snia.wbem.cim.*; import org.snia.wbem.listener.*; import org.snia.wbemcmd.xml.*; import java.net.*; import java.util.*; public class IndConsumer { int proto=CIMClient.XML; String hostName="sequoia"; String nameSpace="root/cimv2"; int portNo=5988; int listenerPortNo=8189; String classText=""; String username="guest"; String password="guest"; String attachName=hostName; boolean cleanupOnly=false; boolean delete=true; CIMClient cc=null; CIMNameSpace clientNameSpace=null; boolean monitorMode=false; String localHostName=null; String sysCreationName="primary"; static final String FCCN="CIM_IndicationFilter"; static final String SCCN="CIM_IndicationSubscription"; IndConsumer() { } void receiveIt(String name, boolean isSSL) { CIMHTTPListener myCIML=null; try { // Get HTTP Listener handle CIMHTTPListener ccl = new CIMHTTPListener(listenerPortNo, isSSL); // add cosumer TestIndicationConsumer consumer1 = new TestIndicationConsumer("1"); ccl.addConsumer(consumer1); ccl.start(); } catch (Exception e) { System.out.println(e); e.printStackTrace(); } System.out.println("Ok - waiting for events "+sysCreationName); } /** Simple old main function It takes an argument '-ssl' for enabling SSL communication */ public static void main(String args[]) throws CIMException { boolean enableSSL=false; if ( args.length != 0 ) { if ( args[0].equals("-ssl") ) { System.out.println("SSL Enabled Indication Listener "); enableSSL = true; } } IndConsumer ti=new IndConsumer(); ti.receiveIt("WBEMIndication", enableSSL); } }
No CVS admin address has been configured |
Powered by ViewCVS 0.9.2 |