edu.emory.mathcs.rmix.spi
Class AbstractServerRef

java.lang.Object
  extended byedu.emory.mathcs.rmix.spi.AbstractServerRef
All Implemented Interfaces:
ServerRef

public abstract class AbstractServerRef
extends java.lang.Object
implements ServerRef

Convenience base class for RMIX providers to implement ServerRef.

Version:
1.0
Author:
Dawid Kurzyniec

Field Summary
protected  BasicExportParams exportParams
           
protected  java.lang.String providerName
           
protected  InvocationTarget target
           
 
Constructor Summary
AbstractServerRef(InvocationTarget target, BasicExportParams params, java.lang.String providerName)
           
 
Method Summary
 boolean equals(java.lang.Object other)
           
 Parameters getExportParameters()
           
 java.lang.Object getParameter(java.lang.String name)
          Gets the value of the provider-specific parameter with a given name.
 java.lang.String getProtocol()
           
 java.lang.String getProviderName()
          Returns fully qualified class name of the RMIX provider backing this server reference.
 InvocationTarget getTarget()
          Returns the invocation target encapsulating the target object that this server reference dispatches calls to.
 int hashCode()
           
 void setParameter(java.lang.String name, java.lang.Object value)
          This implementation always throws IllegalParameterException.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface edu.emory.mathcs.rmix.ServerRef
createRemoteRef, unexport
 

Field Detail

target

protected final InvocationTarget target

exportParams

protected final BasicExportParams exportParams

providerName

protected final java.lang.String providerName
Constructor Detail

AbstractServerRef

public AbstractServerRef(InvocationTarget target,
                         BasicExportParams params,
                         java.lang.String providerName)
Method Detail

getTarget

public final InvocationTarget getTarget()
Description copied from interface: ServerRef
Returns the invocation target encapsulating the target object that this server reference dispatches calls to.

Specified by:
getTarget in interface ServerRef
Returns:
invocation target that this server reference dispatches calls to.

getProtocol

public java.lang.String getProtocol()
Specified by:
getProtocol in interface ServerRef

getProviderName

public java.lang.String getProviderName()
Description copied from interface: ServerRef
Returns fully qualified class name of the RMIX provider backing this server reference.

Specified by:
getProviderName in interface ServerRef
Returns:
fully qualified class name of the RMIX provider backing this server reference.

getExportParameters

public Parameters getExportParameters()
Specified by:
getExportParameters in interface ServerRef

setParameter

public void setParameter(java.lang.String name,
                         java.lang.Object value)
                  throws IllegalParameterException,
                         java.lang.UnsupportedOperationException
This implementation always throws IllegalParameterException.

Specified by:
setParameter in interface ServerRef
Parameters:
name - the name of the parameter to set.
value - the value of the parameter.
Throws:
IllegalParameterException - if the provider does not recognize the parameter with that name, or if the parameter is not of the appropriate type.
java.lang.UnsupportedOperationException - if the parameter cannot be written (for instance, if it is read-only).
See Also:
ServerRef.setParameter(java.lang.String, java.lang.Object)

getParameter

public java.lang.Object getParameter(java.lang.String name)
Description copied from interface: ServerRef
Gets the value of the provider-specific parameter with a given name.

Specified by:
getParameter in interface ServerRef
Parameters:
name - the parameter name.
Returns:
the parameter value.
See Also:
ServerRef.getParameter(java.lang.String)

equals

public boolean equals(java.lang.Object other)

hashCode

public int hashCode()