com.esri.aims.mtier.model.service
Class Services

java.lang.Object
  extended by com.esri.aims.mtier.model.service.Services
All Implemented Interfaces:
Serializable

public class Services
extends Object
implements Serializable

The Services object retrieves a list of services from a specified ArcIMS Server location, and stores them as Service objects in a collection.

See Also:
Serialized Form

Constructor Summary
Services()
          Constructs an instance of a Services object.
 
Method Summary
 void addService(Service obj)
          Adds a Service object to the services collection.
 void clearServices()
          Clears all Service object from the services collection.
 Service getService(int index)
          Returns a Service object by index from the services collection.
 void getServices(String host, int port, String username, String password)
          Gets a list of services from a given ArcIMS Application Server / TCP.
 void getServices(URL url, String username, String password)
          Gets a list of services from a given ArcIMS Application Server / HTTP.
 int getServicesCount()
          Remove the count of Service objects in the collection.
 void removeService(int index)
          Removes a Service object by index from the services collection.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Services

public Services()
Constructs an instance of a Services object.
Services services = new Services();

Method Detail

addService

public void addService(Service obj)
Adds a Service object to the services collection.

Parameters:
obj - the Service object to add.
See Also:
getService(int), removeService(int)

getService

public Service getService(int index)
Returns a Service object by index from the services collection.
Service service = services.getService(0);

Returns:
Service
See Also:
addService(com.esri.aims.mtier.model.service.Service)

removeService

public void removeService(int index)
Removes a Service object by index from the services collection.
services.removeService(0);

See Also:
addService(com.esri.aims.mtier.model.service.Service), clearServices()

clearServices

public void clearServices()
Clears all Service object from the services collection.
services.clearServices();

See Also:
addService(com.esri.aims.mtier.model.service.Service), removeService(int), addService(com.esri.aims.mtier.model.service.Service)

getServicesCount

public int getServicesCount()
Remove the count of Service objects in the collection.
int count = services.getServicesCount();

Returns:
int

getServices

public void getServices(String host,
                        int port,
                        String username,
                        String password)
Gets a list of services from a given ArcIMS Application Server / TCP.
services.getServices("localhost", 5300);

Parameters:
host - the Application Server host name.
port - the port where the Application Server is listening.

getServices

public void getServices(URL url,
                        String username,
                        String password)
Gets a list of services from a given ArcIMS Application Server / HTTP.
 try{
  services.getServices(new java.net.URL("http://localhost"));
    }
    catch(java.net.MalformedURLException me){
      System.out.println(me.getMessage());
 }
 

Parameters:
url - the url location of the ArcIMS services.