org.glite.rgma.discovery
Class ServiceImpl

java.lang.Object
  extended by org.glite.rgma.discovery.ServiceImpl
All Implemented Interfaces:
org.glite.discovery.Service
Direct Known Subclasses:
ServiceDetailsImpl

public class ServiceImpl
extends java.lang.Object
implements org.glite.discovery.Service

Provides basic information about a Service.


Constructor Summary
ServiceImpl()
          Creates a new empty Service object.
ServiceImpl(org.glite.discovery.Service service)
          Creates a new Service object from an existing Service.
ServiceImpl(java.lang.String name, java.lang.String type, java.lang.String endpoint, java.lang.String version)
          Creates a new Service object with the given name, type, endpoint, version and status.
ServiceImpl(java.lang.String name, java.lang.String type, java.lang.String endpoint, java.lang.String version, int status, java.lang.String statusMessage)
          Deprecated. status and statusMessage should not be used in Service, @see ServiceImpl(String,String,String,String)
 
Method Summary
 java.lang.String getEndpoint()
          Gets the service endpoint.
 java.lang.String getName()
          Gets the unique service name.
 int getStatus()
          Deprecated.  
 java.lang.String getStatusMessage()
          Deprecated.  
 java.lang.String getType()
          Gets the service type.
 java.lang.String getVersion()
          Gets the service version.
 void setEndpoint(java.lang.String endpoint)
          Sets the service endpoint.
 void setName(java.lang.String name)
          Sets the unique service name.
 void setStatus(int status)
          Deprecated.  
 void setStatusMessage(java.lang.String statusMessage)
          Deprecated.  
 void setType(java.lang.String type)
          Sets the service type.
 void setVersion(java.lang.String version)
          Sets the service version.
 java.lang.String toString()
          Returns a string representation of this Service.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ServiceImpl

public ServiceImpl()
Creates a new empty Service object.


ServiceImpl

public ServiceImpl(org.glite.discovery.Service service)
Creates a new Service object from an existing Service.

Parameters:
service - A Service object.

ServiceImpl

public ServiceImpl(java.lang.String name,
                   java.lang.String type,
                   java.lang.String endpoint,
                   java.lang.String version,
                   int status,
                   java.lang.String statusMessage)
Deprecated. status and statusMessage should not be used in Service, @see ServiceImpl(String,String,String,String)

Creates a new Service object with the given name, type, endpoint, version and status.

Parameters:
name - The unique service ID.
type - The service type.
endpoint - The service endpoint.
version - A string identifying the version of the current service.
status - The status code for this service (0 is 'available').
statusMessage - The service's status.

ServiceImpl

public ServiceImpl(java.lang.String name,
                   java.lang.String type,
                   java.lang.String endpoint,
                   java.lang.String version)
Creates a new Service object with the given name, type, endpoint, version and status.

Parameters:
name - The unique service ID.
type - The service type.
endpoint - The service endpoint.
version - A string identifying the version of the current service.
Method Detail

toString

public java.lang.String toString()
Returns a string representation of this Service.

Overrides:
toString in class java.lang.Object
Returns:
A String.

getEndpoint

public java.lang.String getEndpoint()
Gets the service endpoint.

Specified by:
getEndpoint in interface org.glite.discovery.Service
Returns:
The service endpoint.

getName

public java.lang.String getName()
Gets the unique service name.

Specified by:
getName in interface org.glite.discovery.Service
Returns:
The unique service name.

getType

public java.lang.String getType()
Gets the service type.

Specified by:
getType in interface org.glite.discovery.Service
Returns:
The service type.

getVersion

public java.lang.String getVersion()
Gets the service version.

Specified by:
getVersion in interface org.glite.discovery.Service
Returns:
The service version as a String.

setEndpoint

public void setEndpoint(java.lang.String endpoint)
Sets the service endpoint.

Parameters:
endpoint - The service endpoint.

setName

public void setName(java.lang.String name)
Sets the unique service name.

Parameters:
name - The unique service name.

setType

public void setType(java.lang.String type)
Sets the service type.

Parameters:
type - The service type.

setVersion

public void setVersion(java.lang.String version)
Sets the service version.

Parameters:
version - The service version as a String.

getStatus

public int getStatus()
Deprecated. 

Gets the service status.

Specified by:
getStatus in interface org.glite.discovery.Service
Returns:
The service status code (0 is 'available').

setStatus

public void setStatus(int status)
Deprecated. 

Sets the service status.

Parameters:
status - The service status code (0 is 'available').

getStatusMessage

public java.lang.String getStatusMessage()
Deprecated. 

Gets the service status message.

Specified by:
getStatusMessage in interface org.glite.discovery.Service
Returns:
The service status message.

setStatusMessage

public void setStatusMessage(java.lang.String statusMessage)
Deprecated. 

Sets the service status message.

Parameters:
statusMessage - The service status message.