public abstract class DistributorSfsbRemote extends Distributor
Constructor and Description |
---|
DistributorSfsbRemote() |
Modifier and Type | Method and Description |
---|---|
StubData |
choose(java.lang.reflect.Method method,
java.lang.Object[] parameters)
Choose a stub - for the SFSB Remote stub, the Distributor class contains
only one stub
|
boolean |
equivAtBind()
To be overriden
|
boolean |
equivAtExport()
To be overriden
|
ObjectId |
getClusterOID()
Get the ObjectId
|
ClusterId |
getCurrentServerId()
Get the current server Id
|
java.lang.reflect.Method |
getHomeCreateMethod()
Get the home create method
Search for a create method with the same parameters as homeCreateParameters
|
protected java.lang.Object[] |
getHomeCreateParameters()
Get the home create parameters
|
Decision |
onException(java.lang.reflect.Method method,
java.lang.Object[] parameters,
StubData sd,
java.lang.Exception ex)
Decison on Exception
The application deployer can override this method to make its own choices.
|
Decision |
onReturn(java.lang.reflect.Method method,
java.lang.Object[] parameters,
StubData sd,
java.lang.Object retVal)
Decision on return
The application deployer can override this method to make its own choices.
|
void |
preInvoke(java.lang.reflect.Method method,
java.lang.Object[] parameters)
Callback invoked just before the method call
Puts RequestId in HAContext
|
void |
read(java.io.ObjectInput in)
Read the input and builds a server stubs list
|
void |
setClusterHandle(ClusterHandle clusterHandle)
Sets the associated ClusterHandle
|
void |
setClusterOID(ObjectId objectId)
Set the ObjectId
|
void |
setCurrentServerId(ClusterId csi)
Set the current server Id
|
void |
setHomeClusterStub(ClusterStub hcs)
Set home cluster stub
|
void |
setHomeCreateParameters(java.lang.Object[] parameters)
Set the home create parameters
|
void |
write(java.io.ObjectOutput out)
Write the server stubs list
|
chooseLocalFirst, getCurrentState, getMyServerId, getStubList, removeStub, removeStub, toContentsString, toString
public void setClusterOID(ObjectId objectId)
clusterOID
- The clusterOID to set.public ObjectId getClusterOID()
public void setHomeClusterStub(ClusterStub hcs)
hcs
- public java.lang.reflect.Method getHomeCreateMethod() throws java.lang.SecurityException, java.lang.NoSuchMethodException
java.lang.NoSuchMethodException
java.lang.SecurityException
public void setHomeCreateParameters(java.lang.Object[] parameters)
parameters
- parameters listprotected java.lang.Object[] getHomeCreateParameters()
public void setCurrentServerId(ClusterId csi)
csi
- ClusterIdpublic ClusterId getCurrentServerId()
public void setClusterHandle(ClusterHandle clusterHandle)
clusterHandle
- the new ClusterHandlepublic boolean equivAtBind()
Distributor
equivAtBind
in class Distributor
Distributor.equivAtBind()
public boolean equivAtExport()
Distributor
equivAtExport
in class Distributor
Distributor.equivAtExport()
public void preInvoke(java.lang.reflect.Method method, java.lang.Object[] parameters)
preInvoke
in class Distributor
method
- calling methodparameters
- parameters of the calling methodpublic StubData choose(java.lang.reflect.Method method, java.lang.Object[] parameters) throws NoServerException
choose
in class Distributor
method
- called methodparameters
- array of parameters passed inNoServerException
- if no stub availablepublic Decision onException(java.lang.reflect.Method method, java.lang.Object[] parameters, StubData sd, java.lang.Exception ex)
onException
in class Distributor
method
- calling methodparameters
- parameters of the calling methodsd
- stub dataex
- exceptionpublic Decision onReturn(java.lang.reflect.Method method, java.lang.Object[] parameters, StubData sd, java.lang.Object retVal)
onReturn
in class Distributor
method
- calling methodparameters
- parameters of the calling methodsd
- stub dataretVal
- return valuepublic void write(java.io.ObjectOutput out) throws java.io.IOException
write
in class Distributor
out
- outputjava.io.IOException
- if an I/O error occurspublic void read(java.io.ObjectInput in) throws java.io.IOException, java.lang.ClassNotFoundException
read
in class Distributor
in
- inputjava.io.IOException
- if an I/O error occursjava.lang.ClassNotFoundException
- if the expected class can not be created