jegg
Interface Port

All Known Implementing Classes:
PortImpl

public interface Port

An egg message port. Everyone egg has one message port that other eggs can use to send messages to the port's owner. To access another egg's port, declare a dependency on the other egg using the <uses> in the application descriptor. See the package documentation for the jegg.* package for more details.


Method Summary
 java.lang.Object getId()
          Return the ID of the egg that owns this port.
 java.lang.Class[] getInterface()
          Return the set of message types understood by the egg associated with this message port.
 void send(Message m)
          Deliver a message to the egg that owns this port.
 void send(java.lang.Object o)
          Deliver an object as a message to the egg that owns this port.
 

Method Detail

getInterface

public java.lang.Class[] getInterface()
Return the set of message types understood by the egg associated with this message port.

Returns:
non-null and non-empty array of class objects.

send

public void send(java.lang.Object o)
          throws PortException
Deliver an object as a message to the egg that owns this port.

Parameters:
o - the object to send to this port's owner. The object will be delivered wrapped in a Message instance.
Throws:
PortException

send

public void send(Message m)
          throws PortException
Deliver a message to the egg that owns this port.

Throws:
PortException

getId

public java.lang.Object getId()
Return the ID of the egg that owns this port.



Copyright © 2004 . All Rights Reserved.