synergynetframework.appsystem.services.net.landiscovery.multicast
Class ServiceDescription

java.lang.Object
  extended by synergynetframework.appsystem.services.net.landiscovery.multicast.ServiceDescription
All Implemented Interfaces:
java.lang.Comparable<ServiceDescription>

public class ServiceDescription
extends java.lang.Object
implements java.lang.Comparable<ServiceDescription>

The Class ServiceDescription.


Constructor Summary
ServiceDescription()
           
 
Method Summary
 int compareTo(ServiceDescription sd)
           
 boolean equals(java.lang.Object o)
           
 java.net.InetAddress getAddress()
          Gets the address.
 java.lang.String getInstanceName()
          Gets the instance name.
 int getPort()
          Gets the port.
 int hashCode()
           
static ServiceDescription parse(java.lang.String encodedInstanceName, java.lang.String addressAsString, java.lang.String portAsString)
          Parses the.
 void setAddress(java.net.InetAddress serviceAddress)
          Sets the address.
 void setInstanceName(java.lang.String serviceDescription)
          Sets the instance name.
 void setPort(int servicePort)
          Sets the port.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ServiceDescription

public ServiceDescription()
Method Detail

parse

public static ServiceDescription parse(java.lang.String encodedInstanceName,
                                       java.lang.String addressAsString,
                                       java.lang.String portAsString)
Parses the.

Parameters:
encodedInstanceName - the encoded instance name
addressAsString - the address as string
portAsString - the port as string
Returns:
the service description

compareTo

public int compareTo(ServiceDescription sd)
              throws java.lang.ClassCastException
Specified by:
compareTo in interface java.lang.Comparable<ServiceDescription>
Throws:
java.lang.ClassCastException

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

getAddress

public java.net.InetAddress getAddress()
Gets the address.

Returns:
the address

getInstanceName

public java.lang.String getInstanceName()
Gets the instance name.

Returns:
the instance name

getPort

public int getPort()
Gets the port.

Returns:
the port

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

setAddress

public void setAddress(java.net.InetAddress serviceAddress)
Sets the address.

Parameters:
serviceAddress - the new address

setInstanceName

public void setInstanceName(java.lang.String serviceDescription)
Sets the instance name.

Parameters:
serviceDescription - the new instance name

setPort

public void setPort(int servicePort)
Sets the port.

Parameters:
servicePort - the new port

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object