com.ibm.able.platform
Class RmiAgentLoggingServiceFactory

java.lang.Object
  |
  +--com.ibm.able.platform.RmiAgentLoggingServiceFactory
All Implemented Interfaces:
org.jagent.service.spi.ServiceFactory

public class RmiAgentLoggingServiceFactory
extends java.lang.Object
implements org.jagent.service.spi.ServiceFactory

This class creates RMI versions of Agent Logging Service objects, and returns them in proxy objects.


Constructor Summary
RmiAgentLoggingServiceFactory()
          Create a factory that knows how to create or find RMI versions of Agent Logging Service objects.
 
Method Summary
static java.lang.String Copyright()
          Determine the copyright of this class.
 javax.agent.service.Service getService(javax.agent.service.ServiceProperties theServiceProperties)
          Create or find an RMI version of an Agent Logging Service.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RmiAgentLoggingServiceFactory

public RmiAgentLoggingServiceFactory()
Create a factory that knows how to create or find RMI versions of Agent Logging Service objects.
Method Detail

getService

public javax.agent.service.Service getService(javax.agent.service.ServiceProperties theServiceProperties)
                                       throws javax.agent.service.ServiceException
Create or find an RMI version of an Agent Logging Service.

Special requirements for the desired service are supplied using the ServiceProperties parameter. Service Properties that this factory examines are:

If the service properties indicate that the desired service is to be located on the host on which this code is running, this factory will attempt to first look up the service in the appropriate (local) RMI registry. If the service is not there, the factory will next attempt to create the service from scratch -- this may even involve creating the RMI registry itself. In other words, if the service is to be here on the local machine,

  1. Get the registry at the specified port
  2. If the registry doesn't exit, create both it and the service
  3. If the registry exists, but the service isn't registered, just create the service
  4. If the registry and the service both exist, simply return the (looked-up) service

If the service properties indicate that the desired service is located on some other host than where this code is running, the factory will attempt to look up the service on the specified host and port. If the desired service is not there, there is no way to create the service remotely, so this method will fail with a ServiceException.

If the desired service can be found or created successfully, the service is returned in the form of a non-RMI proxy.

Specified by:
getService in interface org.jagent.service.spi.ServiceFactory
Parameters:
theServiceProperties - The non-null service properties specifying information to be used in the creation of the Service. Service Properties that this factory examines are:
  • RMIService.SERVICE_HOST
  • RMIService.SERVICE_PORT

If no SERVICE_HOST property is specified, the local host is assumed.

If no SERVICE_PORT property is specified, the default JAVA RMI port is assumed.

Throws:
javax.agent.service.ServiceException - If the desired service cannot be located or created.

Copyright

public static java.lang.String Copyright()
Determine the copyright of this class.
Returns:
A String containing this class's copyright statement.