Oracle Secure Global Desktop Web Services API Documentation
Release 4.7

E21396-02

com.tarantella.tta.webservices.vsbim
Class CandidateServer

java.lang.Object
  extended by com.tarantella.tta.webservices.vsbim.CandidateServer
All Implemented Interfaces:
ICandidateServer, java.io.Serializable, java.lang.Comparable<ICandidateServer>
Direct Known Subclasses:
UserDefinableCandidateServer

public class CandidateServer
extends java.lang.Object
implements ICandidateServer

This class implements ICandidateServer. It represents a server returned from a broker implementing IVirtualServerBroker.

Since:
1.3
See Also:
Serialized Form

Constructor Summary
CandidateServer(ICandidateServer lc)
          Constructor.
CandidateServer(java.lang.String hostname)
          Constructor.
CandidateServer(java.lang.String ipAddress, java.lang.String hostname)
          Constructor.
 
Method Summary
 int compareTo(ICandidateServer lc)
          Compares this object with the specified object for ordering.
 boolean equals(java.lang.Object o)
           
 boolean equalsIgnoreType(ICandidateServer lc)
          Tests whether the given object is equal to this one.
 java.lang.String getConnectionProtocol()
          Gets the protocol to use when connecting to the server.
 java.lang.String getDescription()
          Gets the description of the server.
 java.lang.String getDomain()
          Gets the domain that the server is in.
 java.lang.String getHostname()
          Gets the name of the server.
 java.lang.String getIpAddress()
          Gets the IP address of the server.
 java.lang.String getPassword()
          Gets the password of an account on the server.
 java.lang.String getPermanentName()
          Gets the name to be used if an application server is created when this candidate is used.
 java.lang.String getPort()
          Gets the port for connections to the server.
 java.lang.String getType()
          Gets the type of the server.
 java.lang.String getUsername()
          Gets the username of an account on the server.
 int hashCode()
          Returns a hash code value for the CandidateServer.
 boolean isFallback()
          Gets the fallback flag.
 boolean isPermanent()
          Gets the flag indicating whether SGD should create an application server in the datastore if one does not already exist and this candidate is used.
 boolean isUserDefinable()
          Tests if the broker permits users to override the server definition.
 void setConnectionProtocol(java.lang.String connectionProtocol)
          Sets the protocol to use when connecting to server.
 void setDescription(java.lang.String description)
          Sets the description of the server
 void setDomain(java.lang.String domain)
          Sets the domain the server is in.
 void setFallback(boolean isFallback)
          Sets the fallback flag.
 boolean setHostname(java.lang.String hostname)
          Sets the name of the server
 boolean setIpAddress(java.lang.String ipAddress)
          Sets the IP address of the server
 void setPassword(java.lang.String password)
          Sets the password of an account on the server.
 void setPermanent(boolean permanent)
          Sets the flag requesting SGD to create an application server if this candidate is used.
 void setPermanentName(java.lang.String permanentName)
          Sets the name to be used if SGD should create an application server when this candidate is used.
 void setPort(java.lang.String port)
          Sets the port for connections to the server.
 void setType(java.lang.String type)
          Sets the type parameter.
 void setUsername(java.lang.String username)
          Sets the username of an account on the server.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CandidateServer

public CandidateServer(java.lang.String ipAddress,
                       java.lang.String hostname)
Constructor.

At least one of ipAddress or hostname must be non-null.

Parameters:
ipAddress - The IP address of the server. Can only be null if hostname is not null.
hostname - The name of the server. Can only be null if ipAddress is not null.
Since:
1.3

CandidateServer

public CandidateServer(java.lang.String hostname)
Constructor.

Parameters:
hostname - The name of the server. It cannot be null.
Since:
1.3

CandidateServer

public CandidateServer(ICandidateServer lc)
Constructor.

The details from the supplied object are copied into the newly created instance.

Parameters:
lc - The object to copy.
Since:
1.3
Method Detail

getIpAddress

public java.lang.String getIpAddress()
Description copied from interface: ICandidateServer
Gets the IP address of the server.

Specified by:
getIpAddress in interface ICandidateServer
Returns:
The IP address of the server.

setIpAddress

public boolean setIpAddress(java.lang.String ipAddress)
Sets the IP address of the server

Parameters:
ipAddress - The IP address to set for this server. This can only be set to null if the hostname is not null.
Returns:
true if IP address was successfully set, otherwise false.
Since:
1.3

getHostname

public java.lang.String getHostname()
Description copied from interface: ICandidateServer
Gets the name of the server.

Specified by:
getHostname in interface ICandidateServer
Returns:
The name of the server.

setHostname

public boolean setHostname(java.lang.String hostname)
Sets the name of the server

Parameters:
hostname - The name to set for this server. This can only be set to null if the IP address is not null.
Returns:
true if hostname was successfully set, otherwise false.
Since:
1.3

getDescription

public java.lang.String getDescription()
Description copied from interface: ICandidateServer
Gets the description of the server. This is a user-friendly description of the server.

Specified by:
getDescription in interface ICandidateServer
Returns:
The description of the server.

setDescription

public void setDescription(java.lang.String description)
Sets the description of the server

Parameters:
description - The description to set for the server.
Since:
1.3

getUsername

public java.lang.String getUsername()
Description copied from interface: ICandidateServer
Gets the username of an account on the server.

Specified by:
getUsername in interface ICandidateServer
Returns:
The username of an account on the server.

setUsername

public void setUsername(java.lang.String username)
Sets the username of an account on the server.

Parameters:
username - The username of an account on the server.
Since:
1.3

getPassword

public java.lang.String getPassword()
Description copied from interface: ICandidateServer
Gets the password of an account on the server.

Specified by:
getPassword in interface ICandidateServer
Returns:
The password of an account on the server.

setPassword

public void setPassword(java.lang.String password)
Sets the password of an account on the server.

Parameters:
password - The password of an account on the server.
Since:
1.3

getDomain

public java.lang.String getDomain()
Description copied from interface: ICandidateServer
Gets the domain that the server is in.

Specified by:
getDomain in interface ICandidateServer
Returns:
The domain that the server is in.

setDomain

public void setDomain(java.lang.String domain)
Sets the domain the server is in.

Parameters:
domain - The domain to set for the server .
Since:
1.3

getConnectionProtocol

public java.lang.String getConnectionProtocol()
Description copied from interface: ICandidateServer
Gets the protocol to use when connecting to the server.

Specified by:
getConnectionProtocol in interface ICandidateServer
Returns:
The connection protocol to use.

setConnectionProtocol

public void setConnectionProtocol(java.lang.String connectionProtocol)
Sets the protocol to use when connecting to server.

Parameters:
connectionProtocol - The connection protocol to use.
Since:
1.3

isPermanent

public boolean isPermanent()
Description copied from interface: ICandidateServer
Gets the flag indicating whether SGD should create an application server in the datastore if one does not already exist and this candidate is used.

Specified by:
isPermanent in interface ICandidateServer
Returns:
true if an application server should be created, otherwise false.

setPermanent

public void setPermanent(boolean permanent)
Sets the flag requesting SGD to create an application server if this candidate is used.

Parameters:
permanent - true if an application server should be created, otherwise false.
Since:
1.3

getPermanentName

public java.lang.String getPermanentName()
Description copied from interface: ICandidateServer
Gets the name to be used if an application server is created when this candidate is used. If ICandidateServer.isPermanent() returns false, the name will not be used.

Specified by:
getPermanentName in interface ICandidateServer
Returns:
The name of the application server, if it is created.

setPermanentName

public void setPermanentName(java.lang.String permanentName)
Sets the name to be used if SGD should create an application server when this candidate is used.

Note that setting this name alone does not guarantee that an application server will be created, use setPermanent(boolean) to do that. If the name is not set, but an application server is created, then SGD chooses the name of the application server. It is based off the host name or IP Address of the server used for the launch.

Parameters:
permanentName - The name that will be used if an application server object is created when this candidate is used. A value of null implies that no name has been set, and a name will be generated as per the default behaviour.
Since:
1.3
See Also:
setPermanent(boolean), isPermanent()

toString

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

getType

public java.lang.String getType()
Description copied from interface: ICandidateServer
Gets the type of the server.

The type is used to differentiate between groups of equivalent servers. For example, "TypeU" could be used to identify a group of servers running one operating system and "TypeW" a group running a different operating system. Ideally, this should be meaningful to users.

Specified by:
getType in interface ICandidateServer
Returns:
The type string associated with the server.

setType

public void setType(java.lang.String type)
Sets the type parameter. The type is used to group equivalent servers.

Parameters:
type - The type for the group to which this candidate belongs.
Since:
1.3
See Also:
getType()

getPort

public java.lang.String getPort()
Description copied from interface: ICandidateServer
Gets the port for connections to the server.

Specified by:
getPort in interface ICandidateServer
Returns:
The port for connections to the server.

setPort

public void setPort(java.lang.String port)
Sets the port for connections to the server.

Parameters:
port - The port to be set for the candidate.
Since:
1.3

equals

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

equalsIgnoreType

public boolean equalsIgnoreType(ICandidateServer lc)
Description copied from interface: ICandidateServer
Tests whether the given object is equal to this one. The type attribute of the two objects is ignored.

Specified by:
equalsIgnoreType in interface ICandidateServer
Parameters:
lc - The object to check for equality to this object.
Returns:
true if the objects are equal, otherwise false.

hashCode

public int hashCode()
Returns a hash code value for the CandidateServer.

Overrides:
hashCode in class java.lang.Object
Returns:
a hash code value for this CandidateServer.
Since:
1.3

isUserDefinable

public boolean isUserDefinable()
Description copied from interface: ICandidateServer
Tests if the broker permits users to override the server definition.

Specified by:
isUserDefinable in interface ICandidateServer
Returns:
false
Since:
1.3

isFallback

public boolean isFallback()
Description copied from interface: ICandidateServer
Gets the fallback flag. Servers with this flag set to true are intended as reserve servers and are not preferred choices.

Specified by:
isFallback in interface ICandidateServer
Returns:
true if this server is a fallback server, otherwise false.

setFallback

public void setFallback(boolean isFallback)
Sets the fallback flag.

Parameters:
isFallback - true if this server is intended as a fallback server, otherwise false.
Since:
1.3
See Also:
isFallback()

compareTo

public int compareTo(ICandidateServer lc)
Description copied from interface: ICandidateServer
Compares this object with the specified object for ordering. Returns a negative integer, zero, or a positive integer respectively when this object is less than, equal to, or greater than the specified object.

Specified by:
compareTo in interface ICandidateServer
Specified by:
compareTo in interface java.lang.Comparable<ICandidateServer>
Parameters:
lc - the object to be compared.
Returns:
a negative integer, zero, or a positive integer respectively when this object is less than, equal to, or greater than the specified object.
See Also:
Comparable.compareTo(java.lang.Object)

Oracle Secure Global Desktop Web Services API Documentation
Release 4.7

E21396-02

Copyright © 2012, 2013, Oracle and/or its affiliates. All rights reserved.