|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.globus.wsrf.impl.servicegroup.client.ServiceGroupRegistrationClient
This class is a client library to manage registrations to WS-ServiceGroups. The
term 'managed registration' is used to refer to a registration managed by
this client.
Managed registrations come into existence in two ways:
| Nested Class Summary | |
private class |
ServiceGroupRegistrationClient.RegTimer
Internal class for registration timer event. |
| Field Summary | |
private BaseClient |
baseClient
|
private ServiceGroupRegistrationClientCallback |
clientCallback
|
private static ServiceGroupRegistrationClient |
containerClient
|
private org.apache.axis.message.addressing.EndpointReferenceType |
defaultRegistrantEPR
|
private java.lang.String |
defaultSecDescFile
|
private org.apache.axis.message.addressing.EndpointReferenceType |
defaultServiceGroupEPR
|
(package private) static int |
INITIAL_DELAY_CONTAINER
|
private int |
initialDelay
|
boolean |
isDebug
|
private static int |
LIFETIMECONST
When renewing the lifetime of an entry, the refresh frequency will be multiplied by this constant to give the duration (from now) of the new lifetime. |
private static WSResourceLifetimeServiceAddressingLocator |
lifetimeloc
|
private static int |
LOG_D
|
private static int |
LOG_E
|
private static int |
LOG_I
|
private static int |
LOG_W
|
private static org.apache.commons.logging.Log |
logger
|
boolean |
outputToConsole
|
private boolean |
outputToLog
|
private java.util.List |
registrations
|
private static ServiceGroupServiceAddressingLocator |
sgloc
|
static java.lang.String |
TAG_NS
|
static java.lang.String |
TAG_PARAMS
|
static java.lang.String |
TAG_REG_EPR
|
static java.lang.String |
TAG_SEC_DESC
|
static java.lang.String |
TAG_SG_EPR
|
private TimerManagerImpl |
timerManager
|
| Constructor Summary | |
ServiceGroupRegistrationClient()
Creates a new instance of ServiceGroupRegistrationClient |
|
ServiceGroupRegistrationClient(BaseClient baseClient)
Creates an instance of the client library backed by an instance of a BaseClient derived command line class, inheriting its command line parameters and redirecting output to the console accordingly. |
|
| Method Summary | |
ServiceGroupRegistrationClientCallback |
getClientCallback()
Gets the instance of the ServiceGroupRegistrationClientCallback that is to receive registration status messages. |
static ServiceGroupRegistrationClient |
getContainerClient()
This should only be called when running within a container |
org.apache.axis.message.addressing.EndpointReferenceType |
getDefaultServiceGroupEPR()
|
static org.apache.axis.message.addressing.EndpointReferenceType |
getIndexEPR()
|
org.apache.axis.message.addressing.EndpointReferenceType |
getRegistrantEPR()
|
void |
processConfigFile(java.lang.String fileName)
Parses the config file for registration entries to process. |
static ServiceGroupRegistrationParameters |
readParams(java.lang.String filename)
A helper method for reading a params block from a file. |
static commonj.timers.Timer |
register(org.apache.axis.message.addressing.EndpointReferenceType epr,
java.lang.String regFile)
|
static commonj.timers.Timer |
register(ResourceContext ctx,
org.apache.axis.message.addressing.EndpointReferenceType epr,
java.lang.String regFile)
|
commonj.timers.Timer |
register(ServiceGroupRegistrationParameters params)
Create new managed registration using the supplied registration parameters. |
commonj.timers.Timer |
register(ServiceGroupRegistrationParameters params,
long delayMillis)
Create new managed registration using the supplied registration parameters. |
private void |
reset()
|
void |
setClientCallback(ServiceGroupRegistrationClientCallback callback)
Sets the instance of a ServiceGroupRegistrationClientCallback that is to receive registration status messages. |
void |
setDefaultEPR(org.apache.axis.message.addressing.EndpointReferenceType defaultEPR)
Deprecated. use setDefaultServiceGroupEPR instead |
void |
setDefaultSecDescFile(java.lang.String f)
Sets the default security descriptor filename for registrations that have a null security descriptor filename. |
void |
setDefaultServiceGroupEPR(org.apache.axis.message.addressing.EndpointReferenceType epr)
Sets the service group EPR for registrations that have a null servicegroup field. |
void |
setInitialDelay(int d)
|
void |
setRegistrantEPR(org.apache.axis.message.addressing.EndpointReferenceType epr)
Sets the default registrant EPR for registrations that have a null registrant field. |
private void |
status(int msgType,
java.lang.Object obj)
Internal method for handling console or log4j based output. |
private void |
status(java.lang.Object obj)
status output at default level of Info |
void |
terminate()
Use caution when calling the terminate method, as this method will cause ALL registration timer events to be canceled. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
static final int INITIAL_DELAY_CONTAINER
private int initialDelay
private static ServiceGroupRegistrationClient containerClient
private java.util.List registrations
private TimerManagerImpl timerManager
private BaseClient baseClient
private org.apache.axis.message.addressing.EndpointReferenceType defaultServiceGroupEPR
private org.apache.axis.message.addressing.EndpointReferenceType defaultRegistrantEPR
private java.lang.String defaultSecDescFile
private ServiceGroupRegistrationClientCallback clientCallback
private static org.apache.commons.logging.Log logger
private static final ServiceGroupServiceAddressingLocator sgloc
private static final WSResourceLifetimeServiceAddressingLocator lifetimeloc
private static final int LIFETIMECONST
public boolean isDebug
public boolean outputToConsole
private boolean outputToLog
public static final java.lang.String TAG_SG_EPR
public static final java.lang.String TAG_REG_EPR
public static final java.lang.String TAG_SEC_DESC
public static final java.lang.String TAG_PARAMS
public static final java.lang.String TAG_NS
private static final int LOG_I
private static final int LOG_E
private static final int LOG_W
private static final int LOG_D
| Constructor Detail |
public ServiceGroupRegistrationClient()
public ServiceGroupRegistrationClient(BaseClient baseClient)
| Method Detail |
public void setClientCallback(ServiceGroupRegistrationClientCallback callback)
public ServiceGroupRegistrationClientCallback getClientCallback()
public void setDefaultEPR(org.apache.axis.message.addressing.EndpointReferenceType defaultEPR)
public void setDefaultServiceGroupEPR(org.apache.axis.message.addressing.EndpointReferenceType epr)
public org.apache.axis.message.addressing.EndpointReferenceType getDefaultServiceGroupEPR()
public void setRegistrantEPR(org.apache.axis.message.addressing.EndpointReferenceType epr)
public org.apache.axis.message.addressing.EndpointReferenceType getRegistrantEPR()
public void setDefaultSecDescFile(java.lang.String f)
public void setInitialDelay(int d)
public void processConfigFile(java.lang.String fileName)
throws java.lang.Exception
defaultServiceGroupEPR specifying the
default service group.defaultRegistrantEPR specifying the
default service group.defaultSecurityDescriptorFile
specifying the defauly security descriptor file.ServiceGroupRegistrationParameters.
Each ServiceGroupRegistrationParameters element
defines a managed registration. ServiceGroup, registrant and
security fields may be left blank, in which case they will
be populated with defaults specified in the three
default* configuration options.ServiceGroupRegistrationParameters,
eg registration
fileName - the name of the configuration file to process
java.lang.Exception - if there is an error during processing of the file
public commonj.timers.Timer register(ServiceGroupRegistrationParameters params,
long delayMillis)
params - registration parametersdelayMillis - the delay in milliseconds before executing the
request.public commonj.timers.Timer register(ServiceGroupRegistrationParameters params)
params - registration parameterspublic void terminate()
private void reset()
private void status(java.lang.Object obj)
private void status(int msgType,
java.lang.Object obj)
public static ServiceGroupRegistrationClient getContainerClient()
public static org.apache.axis.message.addressing.EndpointReferenceType getIndexEPR()
throws java.net.MalformedURLException,
java.io.IOException,
org.apache.axis.types.URI.MalformedURIException
java.net.MalformedURLException
java.io.IOException
org.apache.axis.types.URI.MalformedURIException
public static ServiceGroupRegistrationParameters readParams(java.lang.String filename)
throws java.lang.Exception
java.lang.Exception
public static commonj.timers.Timer register(org.apache.axis.message.addressing.EndpointReferenceType epr,
java.lang.String regFile)
throws java.lang.Exception
java.lang.Exception
public static commonj.timers.Timer register(ResourceContext ctx,
org.apache.axis.message.addressing.EndpointReferenceType epr,
java.lang.String regFile)
throws java.lang.Exception
java.lang.Exception
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||