org.apache.itest.posix
Class Service

java.lang.Object
  extended by org.apache.itest.posix.Service
All Implemented Interfaces:
groovy.lang.GroovyObject

public class Service
extends Object
implements groovy.lang.GroovyObject


Constructor Summary
Service(String name)
           
 
Method Summary
 groovy.lang.MetaClass getMetaClass()
           
 String getName()
          Returns name of the service
 Object getProperty(String name)
           
 Object invokeMethod(String name, Object args)
           
 int restart()
          Restart a System V service via a service(8)
 void setMetaClass(groovy.lang.MetaClass metaClass)
           
 void setProperty(String name, Object value)
           
 int start()
          Start a System V service via a service(8)
 String status()
          Get a status of a System V service via a service(8)
 int stop()
          Stop a System V service via a service(8)
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Service

public Service(String name)
Method Detail

start

public int start()
Start a System V service via a service(8)

Returns:
exit code of a service(8) call

stop

public int stop()
Stop a System V service via a service(8)

Returns:
exit code of a service(8) call

restart

public int restart()
Restart a System V service via a service(8)

Returns:
exit code of a service(8) call

status

public String status()
Get a status of a System V service via a service(8)

Returns:
an output of a service(8) call

getName

public String getName()
Returns name of the service

Returns:
service name

getMetaClass

public groovy.lang.MetaClass getMetaClass()
Specified by:
getMetaClass in interface groovy.lang.GroovyObject

setMetaClass

public void setMetaClass(groovy.lang.MetaClass metaClass)
Specified by:
setMetaClass in interface groovy.lang.GroovyObject

invokeMethod

public Object invokeMethod(String name,
                           Object args)
Specified by:
invokeMethod in interface groovy.lang.GroovyObject

getProperty

public Object getProperty(String name)
Specified by:
getProperty in interface groovy.lang.GroovyObject

setProperty

public void setProperty(String name,
                        Object value)
Specified by:
setProperty in interface groovy.lang.GroovyObject


Copyright © 2011. All Rights Reserved.