|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.rit.m2mi.Handle
public abstract class Handle
Class Handle is the abstract base class for all M2MI handle objects. There
are three subclasses corresponding to the three kinds of handles: class
Omnihandle
, class
Unihandle
, and class
Multihandle
. An actual handle class is a synthesized subclass
of one of those three subclasses which implements the handle's target
interface. Calling a target interface method on a handle object causes M2MI
invocations to be performed on the target object or objects to which the
handle refers.
Field Summary | |
---|---|
protected Eoid |
myEoid
Exported object identifier (EOID). |
protected InvocationFactory |
myInvocationFactory
Invocation factory. |
protected Class |
myTargetInterface
Target interface. |
Constructor Summary | |
---|---|
Handle()
Construct a new handle. |
Method Summary | |
---|---|
Eoid |
getEoid()
Returns this handle's exported object identifier (EOID). |
Class |
getInterface()
Returns this handle's target interface. |
String |
getInterfaceName()
Returns this handle's target interface name. |
abstract boolean |
invokes(Object theObject)
Determine if a method invocation on this handle will be executed by the given object. |
protected boolean |
isExportedEoid(Object theObject)
Determine if the given object is exported with this handle's EOID in the M2MI Layer. |
protected boolean |
isExportedInterface(Object theObject)
Determine if the given object is exported with this handle's target interface in the M2MI layer. |
abstract Iterator |
iterator()
Obtain an iterator for visiting the objects associated with this handle. |
protected Iterator |
iteratorEoid()
Obtain an iterator for visiting the objects associated with this handle's EOID. |
protected Iterator |
iteratorInterface()
Obtain an iterator for visiting the objects associated with this handle's target interface. |
void |
readExternal(ObjectInput theObjectInput)
Read this handle from the given object input stream. |
protected void |
setEoid(Eoid theEoid)
Set this handle's EOID. |
protected void |
setInvocationFactory(InvocationFactory theInvocationFactory)
Set this handle's invocation factory. |
protected void |
setTargetInterface(Class theTargetInterface)
Set this handle's target interface. |
void |
writeExternal(ObjectOutput theObjectOutput)
Write this handle to the given object output stream. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected Eoid myEoid
protected Class myTargetInterface
protected InvocationFactory myInvocationFactory
Constructor Detail |
---|
public Handle()
Method Detail |
---|
public Eoid getEoid()
public Class getInterface()
public String getInterfaceName()
public abstract boolean invokes(Object theObject)
Omnihandle.invokes()
, Unihandle.invokes()
, or Multihandle.invokes()
for further
information.
theObject
- Object to test.
IllegalStateException
- (unchecked exception) Thrown if the M2MI Layer is not initialized.public abstract Iterator iterator()
public void writeExternal(ObjectOutput theObjectOutput) throws IOException
writeExternal
in interface Externalizable
theObjectOutput
- Object output stream.
IOException
- Thrown if an I/O error occurred.public void readExternal(ObjectInput theObjectInput) throws ClassNotFoundException, IOException
readExternal
in interface Externalizable
theObjectInput
- Object input stream.
ClassNotFoundException
- Thrown if the class for an object being deserialized cannot be found.
IOException
- Thrown if an I/O error occurred.protected void setEoid(Eoid theEoid)
theEoid
- EOID.protected void setTargetInterface(Class theTargetInterface)
theTargetInterface
- Target interface.protected void setInvocationFactory(InvocationFactory theInvocationFactory)
theInvocationFactory
- Invocation factory.protected boolean isExportedEoid(Object theObject)
theObject
- Object to test.
IllegalStateException
- (unchecked exception) Thrown if the M2MI Layer is not initialized.protected boolean isExportedInterface(Object theObject)
theObject
- Object to test.
IllegalStateException
- (unchecked exception) Thrown if the M2MI Layer is not initialized.protected Iterator iteratorEoid()
protected Iterator iteratorInterface()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |