gov.nih.nci.cagrid.advertisement
Class AdvertisementClient

java.lang.Object
  extended by gov.nih.nci.cagrid.advertisement.AdvertisementClient

public class AdvertisementClient
extends java.lang.Object

AdvertisementClient Currently just a wrapper for ServiceGroupRegistrationClient, because its expected expected future releases of ServiceGroupRegistrationClient will have some needed features (such as unregistration).

Version:
$Id: multiscaleEclipseCodeTemplates.xml,v 1.1 2007/03/02 14:35:01 dervin Exp $
Author:
oster

Nested Class Summary
protected  class AdvertisementClient.Callback
          Logs status information.
 
Field Summary
protected  org.globus.wsrf.impl.servicegroup.client.ServiceGroupRegistrationClient client
           
protected static org.apache.commons.logging.Log LOG
           
protected  org.globus.mds.servicegroup.client.ServiceGroupRegistrationParameters sgParams
           
 
Constructor Summary
protected AdvertisementClient()
           
  AdvertisementClient(java.io.File registrationConfigFile)
          Parses the file representing ServiceGroupRegistrationParameters
  AdvertisementClient(org.globus.mds.servicegroup.client.ServiceGroupRegistrationParameters registrationConfig)
          Initializes the client with the service group parameters
 
Method Summary
static void main(java.lang.String[] args)
           
static java.lang.String printServiceGroupRegistrationParameters(org.globus.mds.servicegroup.client.ServiceGroupRegistrationParameters params)
          Returns a prinatable string representing the registration information
 void register()
          Registers with the service group
 void reinitialize(org.globus.mds.servicegroup.client.ServiceGroupRegistrationParameters registrationConfig)
          Can be called to cancel any existing registration, and repurpose the client for new registrations.
 void unregister()
          Unregisters from the service group
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOG

protected static org.apache.commons.logging.Log LOG

sgParams

protected org.globus.mds.servicegroup.client.ServiceGroupRegistrationParameters sgParams

client

protected org.globus.wsrf.impl.servicegroup.client.ServiceGroupRegistrationClient client
Constructor Detail

AdvertisementClient

protected AdvertisementClient()

AdvertisementClient

public AdvertisementClient(java.io.File registrationConfigFile)
                    throws InvalidConfigurationException
Parses the file representing ServiceGroupRegistrationParameters

Parameters:
registrationConfigFile -
Throws:
InvalidConfigurationException

AdvertisementClient

public AdvertisementClient(org.globus.mds.servicegroup.client.ServiceGroupRegistrationParameters registrationConfig)
                    throws InvalidConfigurationException
Initializes the client with the service group parameters

Parameters:
registrationConfig -
Throws:
InvalidConfigurationException - if the specific configuration is not valid
See Also:
reinitialize(ServiceGroupRegistrationParameters)
Method Detail

reinitialize

public void reinitialize(org.globus.mds.servicegroup.client.ServiceGroupRegistrationParameters registrationConfig)
                  throws InvalidConfigurationException
Can be called to cancel any existing registration, and repurpose the client for new registrations.

Parameters:
registrationConfig -
Throws:
InvalidConfigurationException - if the specified config is invalid (in this case the client remains in the old state). An invalid config is one which is null, or has a null servicegroup or registrant epr

register

public void register()
Registers with the service group


unregister

public void unregister()
                throws UnregistrationException
Unregisters from the service group

Throws:
UnregistrationException

printServiceGroupRegistrationParameters

public static java.lang.String printServiceGroupRegistrationParameters(org.globus.mds.servicegroup.client.ServiceGroupRegistrationParameters params)
Returns a prinatable string representing the registration information

Parameters:
params -
Returns:
The registration parameters

main

public static void main(java.lang.String[] args)