public class Ping
extends java.lang.Object
Property Keyword | Datatype | Default | Description |
---|---|---|---|
Properties | String | null | A file containing ping properties. Properties that additionally added at command line have higher priority than these from file. |
NameServiceName | String | NameService | The name of the requested CORBA Name Service. |
NameServicePort | int | 900 | The port number of the requested CORBA Name Service. |
NameServiceHost | String | localhost | The host name of the requested CORBA Name Service. |
CORBAProtocol | String | "" | The CORBA protocol in the corbaloc (CORBA locator) to find the name service. The default of CORBA is iiop, which is identical with an empty string "". For IIOP over SSL the protocol must be ssliop. This value is an application property. |
ServiceName | String | empty | The service to be used. |
SessionFactoryOptions | String | none | Implementation dependent options passed to the session factory when the session factory is instantiated. This option could contain something like "DEBUGLEVEL=3". |
Username | String | empty | The name of the user used to connect to server. |
Password | String | empty | The password of the user used to connect to server. |
Waits | int[] | [10, 10, 100, 10000] | An array of integer defining the total number of loops and the sleep time in seconds for reconnection. |
StdOut | File | none | The name of a file that tool uses as standard output stream. |
StdErr | File | none | The name of a file that tool uses as standard error stream. |
NumberParallel | integer | 1 | The number of parallel access |
Duration | integer | 0 | The duration the parallel access are tested, 0 means only 1 time. The duration is given in minutes. |
EncodePassword | boolean | false | In case this property is true the password is encoded. |
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DEFAULT_CORBA_PROTOCOL |
static java.lang.String |
DEFAULT_NAME_SERVICE_NAME |
static java.lang.String |
DEFAULT_NAME_SERVICE_PORT |
static int[] |
DEFAULT_WAITS |
protected long |
duration |
protected int |
errorStatus |
protected java.lang.String |
hostname |
protected int |
numberParallel |
protected org.omg.CORBA.ORB |
orb |
protected java.util.Properties |
properties |
protected int[] |
waits |
Constructor and Description |
---|
Ping(java.lang.String[] args)
The constructor that receives the arguments from command line.
|
Modifier and Type | Method and Description |
---|---|
protected static java.lang.String |
aoExceptionToString(AoException aoException) |
protected static java.lang.String |
describe(org.omg.CORBA.SystemException e) |
protected static java.lang.String |
describe(org.omg.CORBA.SystemException e,
java.lang.String[] args,
java.util.Properties props) |
int |
errorStatus()
Get the error status of the program.
|
protected void |
finalize() |
protected org.omg.CosNaming.NamingContextExt |
getNamingContext() |
java.lang.String[] |
getOrbArguments() |
protected java.util.Properties |
getOrbProperties() |
java.lang.String |
getProperty(java.lang.String key)
Get a property.
|
boolean |
getProperty(java.lang.String key,
boolean def)
Get a property.
|
int |
getProperty(java.lang.String key,
int def)
Get a property.
|
java.lang.String |
getProperty(java.lang.String key,
java.lang.String def)
Get a property.
|
protected java.lang.String |
getSessionOptions() |
java.lang.String[] |
listServices()
Creates a new factory of the requested service.
|
protected void |
log(java.io.PrintStream out,
java.lang.String message) |
protected void |
log(java.io.PrintStream out,
java.lang.Throwable t,
java.lang.String message) |
static void |
main(java.lang.String[] args)
The main startup method.
|
AoFactory |
newFactory(java.lang.String serviceName)
Creates a new factory of the requested service.
|
protected org.omg.CORBA.ORB |
orbInit(java.lang.String[] args,
java.util.Properties props)
Creates a new ORB for Corba clients, servers and the name server.
|
static void |
setOutputStreams(java.lang.String[] args)
Analize the arguments for StdOut and StdErr keywords and set the system out and err stream.
|
protected static java.lang.String |
severityFlagToString(SeverityFlag sevFlag) |
protected static java.lang.String |
toString(java.lang.String[] args,
java.util.Properties props) |
public static final java.lang.String DEFAULT_NAME_SERVICE_NAME
public static final java.lang.String DEFAULT_NAME_SERVICE_PORT
public static final java.lang.String DEFAULT_CORBA_PROTOCOL
public static final int[] DEFAULT_WAITS
protected java.util.Properties properties
protected java.lang.String hostname
protected int[] waits
protected int errorStatus
protected int numberParallel
protected long duration
protected org.omg.CORBA.ORB orb
public Ping(java.lang.String[] args)
args
- The command line arguments.protected void finalize() throws java.lang.Throwable
finalize
in class java.lang.Object
java.lang.Throwable
protected org.omg.CosNaming.NamingContextExt getNamingContext()
public java.lang.String getProperty(java.lang.String key)
public java.lang.String getProperty(java.lang.String key, java.lang.String def)
public int getProperty(java.lang.String key, int def)
public boolean getProperty(java.lang.String key, boolean def)
protected org.omg.CORBA.ORB orbInit(java.lang.String[] args, java.util.Properties props)
args
- Command-line arguments for the application's main method.
May be null.props
- Application-specific properties.
May be null.public java.lang.String[] getOrbArguments()
protected java.lang.String getSessionOptions()
protected java.util.Properties getOrbProperties()
protected static java.lang.String toString(java.lang.String[] args, java.util.Properties props)
protected static java.lang.String describe(org.omg.CORBA.SystemException e)
protected static java.lang.String describe(org.omg.CORBA.SystemException e, java.lang.String[] args, java.util.Properties props)
public AoFactory newFactory(java.lang.String serviceName)
serviceName
- The name of the requested
service.AoException
- with the following possible error codes:
AO_BAD_PARAMETER
AO_IMPLEMENTATION_PROBLEM
AO_NOT_IMPLEMENTED
AO_NO_MEMORY
public java.lang.String[] listServices()
serviceName
- The name of the requested
service.AoException
- with the following possible error codes:
AO_BAD_PARAMETER
AO_IMPLEMENTATION_PROBLEM
AO_NOT_IMPLEMENTED
AO_NO_MEMORY
public static void setOutputStreams(java.lang.String[] args)
args
- The startup arguments.public int errorStatus()
protected static java.lang.String aoExceptionToString(AoException aoException)
protected static java.lang.String severityFlagToString(SeverityFlag sevFlag)
protected void log(java.io.PrintStream out, java.lang.String message)
protected void log(java.io.PrintStream out, java.lang.Throwable t, java.lang.String message)
public static void main(java.lang.String[] args)
see
- the class description