org.rhq.bindings.util
Class ScriptUtil

java.lang.Object
  extended by org.rhq.bindings.util.ScriptUtil

public class ScriptUtil
extends Object

Instance of this class is injected into the script engine scope.

Author:
Lukas Krejci

Constructor Summary
ScriptUtil(RhqFacade remoteClient)
           
 
Method Summary
 org.rhq.core.domain.util.PageList<org.rhq.core.domain.resource.Resource> findResources(String string)
           
 byte[] getFileBytes(String fileName)
           
 void init(ScriptEngine scriptEngine)
          This method is called before the instance is inserted into the script engine scope.
 boolean isDefined(String identifier)
           
 void saveBytesToFile(byte[] bytes, String filename)
           
 void sleep(long millis)
           
 org.rhq.core.domain.operation.ResourceOperationHistory waitForScheduledOperationToComplete(org.rhq.core.domain.operation.bean.ResourceOperationSchedule schedule)
           
 org.rhq.core.domain.operation.ResourceOperationHistory waitForScheduledOperationToComplete(org.rhq.core.domain.operation.bean.ResourceOperationSchedule schedule, long intervalDuration, int maxIntervals)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ScriptUtil

public ScriptUtil(RhqFacade remoteClient)
Method Detail

init

public void init(ScriptEngine scriptEngine)
This method is called before the instance is inserted into the script engine scope.

Parameters:
scriptEngine - the script engine this instance is to be injected in

findResources

public org.rhq.core.domain.util.PageList<org.rhq.core.domain.resource.Resource> findResources(String string)

saveBytesToFile

public void saveBytesToFile(byte[] bytes,
                            String filename)
                     throws IOException
Throws:
IOException

getFileBytes

public byte[] getFileBytes(String fileName)

sleep

public void sleep(long millis)

waitForScheduledOperationToComplete

public org.rhq.core.domain.operation.ResourceOperationHistory waitForScheduledOperationToComplete(org.rhq.core.domain.operation.bean.ResourceOperationSchedule schedule)
                                                                                           throws InterruptedException
Throws:
InterruptedException

waitForScheduledOperationToComplete

public org.rhq.core.domain.operation.ResourceOperationHistory waitForScheduledOperationToComplete(org.rhq.core.domain.operation.bean.ResourceOperationSchedule schedule,
                                                                                                  long intervalDuration,
                                                                                                  int maxIntervals)
                                                                                           throws InterruptedException
Throws:
InterruptedException

isDefined

public boolean isDefined(String identifier)


Copyright © 2008-2012 Red Hat, Inc.. All Rights Reserved.