fr.lifl.magique.util
Class Name

java.lang.Object
  extended byfr.lifl.magique.util.Name

public class Name
extends java.lang.Object

class with static methods used to manage name of the form shortName@hostName:port if no server socket is launch for an agent : port is replaced by a negative numer. The unicity of name is not guaranteed if several agent without serversocket are used in different JVM on the same host


Constructor Summary
Name()
           
 
Method Summary
static java.lang.String getHostName(java.lang.String name)
          extract the name of host machine, name must be of the form shortname@hostName:PORT
static java.lang.String getPort(java.lang.String name)
          extract the name of host machine, name must be of the form shortname@hostName:PORT
static java.lang.String getShortName(java.lang.String name)
          extract the short name from name, name must be of the form shortname@hostName:PORT
static java.lang.String noShortName(java.lang.String name)
          extract the name and port of host machine (platform), name must be of the form shortname@hostName:PORT
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Name

public Name()
Method Detail

getShortName

public static java.lang.String getShortName(java.lang.String name)
extract the short name from name, name must be of the form shortname@hostName:PORT

Parameters:
name - the name to be parsed
Returns:
the short name

getHostName

public static java.lang.String getHostName(java.lang.String name)
extract the name of host machine, name must be of the form shortname@hostName:PORT

Parameters:
name - the name to be parsed
Returns:
the host name

getPort

public static java.lang.String getPort(java.lang.String name)
extract the name of host machine, name must be of the form shortname@hostName:PORT

Parameters:
name - the name to be parsed
Returns:
the port number

noShortName

public static java.lang.String noShortName(java.lang.String name)
extract the name and port of host machine (platform), name must be of the form shortname@hostName:PORT

Parameters:
name - the name to be parsed
Returns:
the host name