org.globus.exec.service.test.throughput.util
Class StubManager

java.lang.Object
  extended by org.globus.exec.service.test.throughput.util.StubManager

public class StubManager
extends java.lang.Object

Manage stubs. StubManager uses StubFactory and StubCache to handle creation and caching of stubs. By using StubManager a developer doesn't have to deal with cache and factory.


Field Summary
private static org.apache.commons.logging.Log logger
           
private  StubCache stubCache
           
private  StubFactory stubFactory
           
 
Constructor Summary
StubManager(StubFactory stubFactory)
          Create a stub manager.
StubManager(StubFactory stubFactory, StubCache stubCache)
          Create a stub manager.
 
Method Summary
 void addStub(org.globus.axis.message.addressing.EndpointReferenceType epr, javax.xml.rpc.Stub stub)
          Add a stub to the stub cache.
 javax.xml.rpc.Stub getStub(ServiceNameType serviceName, org.globus.axis.message.addressing.EndpointReferenceType epr, ClientSecurityDescriptor secDesc)
          Get a stub.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

private static org.apache.commons.logging.Log logger

stubFactory

private StubFactory stubFactory

stubCache

private StubCache stubCache
Constructor Detail

StubManager

public StubManager(StubFactory stubFactory)
            throws java.lang.Exception
Create a stub manager. Use the specified stub factory to create stubs. Don't cache connections.

Throws:
java.lang.Exception

StubManager

public StubManager(StubFactory stubFactory,
                   StubCache stubCache)
            throws java.lang.Exception
Create a stub manager. Use the specified stub factory and stub cache for managing stubs.

Throws:
java.lang.Exception
Method Detail

getStub

public javax.xml.rpc.Stub getStub(ServiceNameType serviceName,
                                  org.globus.axis.message.addressing.EndpointReferenceType epr,
                                  ClientSecurityDescriptor secDesc)
                           throws java.lang.Exception
Get a stub. If a suitable cache is found in the cache it is returned. If not, a new stub object is created and returned.

Throws:
java.lang.Exception

addStub

public void addStub(org.globus.axis.message.addressing.EndpointReferenceType epr,
                    javax.xml.rpc.Stub stub)
Add a stub to the stub cache.