public final class ServerManager extends Object
| Modifier and Type | Field and Description |
|---|---|
static int |
SERVER_NAME_MAX_LENGTH
maximun length for device server name (255 characters)
|
| Modifier and Type | Method and Description |
|---|---|
void |
addClass(String tangoClass,
Class<?> deviceClass)
Add a class to the server.
|
String |
getAdminDeviceName() |
String[] |
getDevicesOfClass(String tangoClass)
Get the started devices of this server.
|
String |
getExecName()
execName/instanceName
|
String |
getHostName()
The host on which this server is running
|
static ServerManager |
getInstance()
Get a ServerManager
|
String |
getInstanceName()
The instance name
|
String |
getPid()
The pid of this server
|
String |
getServerName()
The server name
|
TransactionType |
getTransactionType() |
boolean |
isStarted() |
void |
setTransactionType(TransactionType transactionType)
Set the transaction type for all server.
|
void |
start(String[] args,
Class<?> deviceClass)
Starts a Tango server.
|
void |
start(String[] args,
String execName)
Starts a Tango server.
|
void |
startDevice(String deviceName,
Class<?> deviceClass) |
void |
startError(String[] args,
String execName)
Idem as start but throw exceptions.
|
void |
stop()
Stop the server and clear all
|
void |
stopDevice(String deviceName) |
public static final int SERVER_NAME_MAX_LENGTH
public static ServerManager getInstance()
public void addClass(String tangoClass, Class<?> deviceClass)
tangoClass - The class name as defined in the tango databasedeviceClass - The class that define a device with Devicepublic void startDevice(String deviceName, Class<?> deviceClass) throws fr.esrf.Tango.DevFailed
fr.esrf.Tango.DevFailedpublic void stopDevice(String deviceName) throws fr.esrf.Tango.DevFailed
fr.esrf.Tango.DevFailedpublic void start(String[] args, String execName)
ServerManager.getInstance().addClass(JTangoTest.class.getCanonicalName(), JTangoTest.class);
ServerManager.getInstance().start(new String[] { "1" }, "JTangoTest");
args - The arguments to pass. instanceName [-v[trace level]] [-nodb
[-dlist execName - The name of the server as defined by Tango.addClass(String, Class)public void startError(String[] args, String execName) throws fr.esrf.Tango.DevFailed
args - execName - fr.esrf.Tango.DevFailedpublic void start(String[] args, Class<?> deviceClass)
ServerManager.getInstance().start(new String[] { "1" }, JTangoTest.class);
args - The arguments to pass. instanceName [-v[trace level]] [-nodb
[-dlist deviceClass - The class of the device. The server name and class name must
be defined in tango db with deviceClass.getSimpleName to be
started with this method.addClass(String, Class)public void stop()
throws fr.esrf.Tango.DevFailed
fr.esrf.Tango.DevFailedpublic void setTransactionType(TransactionType transactionType)
Device.transactionType()transactionType - public TransactionType getTransactionType()
public String getHostName()
public String getPid()
public String getExecName()
public String getInstanceName()
public String getServerName()
public String[] getDevicesOfClass(String tangoClass) throws fr.esrf.Tango.DevFailed
tangoClass - fr.esrf.Tango.DevFailedpublic String getAdminDeviceName()
public boolean isStarted()
Copyright © 2012–2017 Tango Controls. All rights reserved.