/* Copyright 1999-2011 (c) My-Channels Copyright (c) 2012-2015 Software AG, Darmstadt, Germany and/or Software AG USA Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors. Use, reproduction, transfer, publication or disclosure is prohibited except as specifically provided for in your License Agreement with Software AG. */ package com.pcbsys.nirvana.apps; import com.pcbsys.nirvana.client.nChannel; import com.pcbsys.nirvana.client.nChannelAttributes; import com.pcbsys.nirvana.client.nChannelPublishKeys; import com.pcbsys.nirvana.client.nFindResult; import com.pcbsys.nirvana.client.nQueue; import com.pcbsys.nirvana.client.nRealmUnreachableException; import com.pcbsys.nirvana.client.nSessionFactory; import com.pcbsys.nirvana.client.nSessionPausedException; import com.pcbsys.nirvana.client.nStoreProperties; public class findChannelsAndQueues extends nSampleApp { private static findChannelsAndQueues mySelf=null; private static final int sChannels = 0; private static final int sQueues = 1; private static final int sPersist = 0; private static final int sMixed = 1; private static final int sReliable = 2; private static final int sSimple = 3; private static final int sTransient = 4; private static int[][] mySummary = new int[2][5]; /** * This class demonstrates the Nirvana API calls necessary to locate multiple nChannel and nQueue objects in 1 method call * * @param realmDetails a String[] containing the possible RNAME values * @param names a String[] containing the names of the channels / queue objects * */ private void doit(String[] realmDetails, String[] names)throws nRealmUnreachableException { mySelf.constructSession(realmDetails); try{ nChannelAttributes[] att = new nChannelAttributes[names.length]; for(int x=0;x 0) { for (int x = 0; x < keys.length; x++) { System.out.println(" Key "+keys[x].getName()+" depth "+keys[x].getDepth()); } } System.out.println(" End Of Publish Keys"); System.out.println("******************************"); System.out.println(""); } private void displayException(nFindResult result){ System.err.println("******************************"); System.err.println(" Request generated an exception for "+result.getAttributes().getName()); System.err.println(" : "+result.getException().getMessage()); System.err.println("******************************"); System.err.println(""); } /** * Prints the usage string for this class */ private static void Usage() { System.out.println( "Usage ...\n" ); System.out.println("findChannelsAndQueues .....\n"); System.out.println( " \n"); System.out.println( " - The name(s) of the channels to find" ); System.out.println( "\n\nNote: -? provides help on environment variables \n"); } } // End of getChannels Class