org.sapia.ubik.rmi.server
Class StubContainerBase

java.lang.Object
  extended by org.sapia.ubik.rmi.server.StubContainerBase
All Implemented Interfaces:
java.io.Serializable, HealthCheck, StubContainer

public class StubContainerBase
extends java.lang.Object
implements StubContainer, HealthCheck

Base implementation of the StubContainer interface.

Author:
Yanick Duchesne
Copyright:
Copyright © 2002-2003 Sapia Open Source Software. All Rights Reserved.
License:
Read the license.txt file of the jar or visit the license page at the Sapia OSS web site
See Also:
Serialized Form

Constructor Summary
protected StubContainerBase(java.lang.String[] interfaceNames, StubInvocationHandler handler)
           
 
Method Summary
 StubInvocationHandler getStubInvocationHandler()
          Returns the invocation handler that this instance wraps.
 boolean isValid()
          Returns true if the connection to the remote server of the stub that this instance wraps is still valid.
 java.lang.String toString()
           
 java.lang.Object toStub(java.lang.ClassLoader loader)
          Returns the stub that this instance contains.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StubContainerBase

protected StubContainerBase(java.lang.String[] interfaceNames,
                            StubInvocationHandler handler)
Method Detail

isValid

public boolean isValid()
                throws java.rmi.RemoteException
Returns true if the connection to the remote server of the stub that this instance wraps is still valid.

Specified by:
isValid in interface HealthCheck
Throws:
java.rmi.RemoteException - if a problem occurs performing the check; if such an error occurs, this instance should be treated as invalid.

toStub

public java.lang.Object toStub(java.lang.ClassLoader loader)
                        throws java.rmi.RemoteException
Description copied from interface: StubContainer
Returns the stub that this instance contains.

Specified by:
toStub in interface StubContainer
Returns:
the stub that this instance contains.
Throws:
java.rmi.RemoteException - if the stub could not be created.
See Also:
StubContainer.toStub(ClassLoader)

getStubInvocationHandler

public StubInvocationHandler getStubInvocationHandler()
Description copied from interface: StubContainer
Returns the invocation handler that this instance wraps.

Specified by:
getStubInvocationHandler in interface StubContainer
Returns:
a StubInvocationHandler.
See Also:
StubContainer.getStubInvocationHandler()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2010 Sapia OSS. All Rights Reserved.