We are unable to create a working RvcacheProxy object. Are there any example code on how to do this?

We are unable to create a working RvcacheProxy object. Are there any example code on how to do this?

book

Article ID: KB0087176

calendar_today

Updated On:

Products Versions
TIBCO Rendezvous -
Not Applicable -

Description

Resolution:
Please find here below an example where RV java configuration API is used to browse RvcacheProxy object through admin interface to check if rvcache is running.

===========================================
DaemonManager daemonManager = new DaemonManager("http://localhost:7581");
RvcacheProxy daemonProxy = (RvcacheProxy) daemonManager.getDaemonProxy();
String componentName = daemonProxy.getComponentName();
ComponentInformation componentInformation = daemonProxy.getComponentInformation();
System.out.println("The name of this component is: "
                               + componentName);
Map componentInformationMap = componentInformation.getAsMap();
System.out.println("This component is decribed by the following information...");
Iterator iterator = componentInformationMap.keySet().iterator();
while (iterator.hasNext()) {
                String key = (String) iterator.next();
                System.out.println(key
                                   + ": "
                                   + componentInformationMap.get(key));
   }

RvcacheProxy rvcacheProxy = (RvcacheProxy) daemonProxy;

CachedSubject[] subjects = rvcacheProxy .getCachedSubjects();
for (int i = 0; i < subjects.length; i++) {
                   System.out.println(subjects[i].getSubject());
            }

boolean bRunning = rvcacheProxy .isRunning();
if (bRunning)
        System.out.println("rvcache  is running");
===========================================

Issue/Introduction

We are unable to create a working RvcacheProxy object. Are there any example code on how to do this?