|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Channel
Channel connects two or more Pieces - the left Piece(s)
can call the given interface of the right Piece(s) and vice versa.
| Method Summary | |
|---|---|
void |
connectAnti(Plug newPlug,
Plug antiPlug)
Connects a new Plug to the opposite Channel-side. |
void |
connectLeft(Plug newPlug)
Connects a new Plug to the left Channel-side. |
void |
connectPro(Plug newPlug,
Plug proPlug)
Connects a new Plug to the same Channel-side. |
void |
connectRight(Plug newPlug)
Connects a new Plug to the right Channel-side. |
void |
disconnect(Plug oldPlug)
Disconnects the old Plug from the Channel. |
void |
disconnectAll()
Disconnects all Plugs from the Channel. |
Plug[] |
getAnti(Plug antiPlug)
Returns the array of opposite-side objects ( Plugs). |
java.lang.Object |
getInterface(Plug caller)
Returns the interface object of the given Channel-side. |
java.lang.String |
getInterfaceNameAnti(Plug antiPlug)
Returns an interface name of the opposite Channel-side. |
java.lang.String |
getInterfaceNamePro(Plug proPlug)
Returns an interface name of the same Channel-side. |
Plug[] |
getLeft()
Returns the array of left-side objects ( Plugs). |
int |
getLeftCount()
Returns the left Channel-side count. |
java.lang.Object |
getLeftInterface()
Returns the interface object of the left Channel-side. |
java.lang.String |
getLeftInterfaceName()
Returns an interface name of the left Channel-side. |
Plug[] |
getPro(Plug proPlug)
Returns the array of same-side objects ( Plugs). |
Plug[] |
getRight()
Returns the array of right-side objects ( Plugs). |
int |
getRightCount()
Returns the right Channel-side count. |
java.lang.Object |
getRightInterface()
Returns the interface object of the right Channel-side. |
java.lang.String |
getRightInterfaceName()
Returns an interface name of the right Channel-side. |
boolean |
isLeft(Plug oldPlug)
Is the given Plug connected to the left Channel-side? |
boolean |
isRight(Plug oldPlug)
Is the given Plug connected to the right Channel-side? |
boolean |
prepare()
Prepares the Channel to regular operation. |
java.lang.Object |
setInterface(java.lang.Object newInterface,
Plug called)
Sets new interface object for the given Channel-side. |
void |
setInterfaceNames(java.lang.String _leftInterfaceName,
java.lang.String _rightInterfaceName)
(Re-)initialize both interface names. |
java.lang.Object |
setLeftInterface(java.lang.Object newLeftInterface)
Sets new interface object for the left Channel-side. |
java.lang.Object |
setRightInterface(java.lang.Object newRightInterface)
Sets new interface object for the right Channel-side. |
| Method Detail |
|---|
void setInterfaceNames(java.lang.String _leftInterfaceName,
java.lang.String _rightInterfaceName)
_leftInterfaceName - Fully-qualified interface name of the left side (called
from the right side)._rightInterfaceName - Fully-qualified interface name of the right side (called
from the left side).getLeftInterfaceName(),
getRightInterfaceName()java.lang.String getLeftInterfaceName()
setInterfaceNames(java.lang.String, java.lang.String),
getRightInterfaceName()java.lang.String getRightInterfaceName()
setInterfaceNames(java.lang.String, java.lang.String),
getLeftInterfaceName()java.lang.String getInterfaceNamePro(Plug proPlug)
proPlug - The Plug connected to the same side.
getInterfaceNameAnti(cz.cuni.jagrlib.Plug)java.lang.String getInterfaceNameAnti(Plug antiPlug)
antiPlug - The Plug connected to the opposite side.
getInterfaceNamePro(cz.cuni.jagrlib.Plug)java.lang.Object setLeftInterface(java.lang.Object newLeftInterface)
newLeftInterface - New interface object (= object called from the opposite side).
setRightInterface(java.lang.Object),
setInterface(java.lang.Object, cz.cuni.jagrlib.Plug)java.lang.Object setRightInterface(java.lang.Object newRightInterface)
newRightInterface - New interface object (= object called from the opposite side).
setLeftInterface(java.lang.Object),
setInterface(java.lang.Object, cz.cuni.jagrlib.Plug)
java.lang.Object setInterface(java.lang.Object newInterface,
Plug called)
Piece connected to it.
newInterface - New interface object (= object called from the opposite side).called - The Plug defining the side.
setLeftInterface(java.lang.Object),
setRightInterface(java.lang.Object)java.lang.Object getLeftInterface()
setLeftInterface(java.lang.Object)java.lang.Object getRightInterface()
setRightInterface(java.lang.Object)java.lang.Object getInterface(Plug caller)
Plug which calls it.
caller - The Plug defining the opposite (caller) side.
setInterface(java.lang.Object, cz.cuni.jagrlib.Plug)void connectLeft(Plug newPlug)
Plug to the left Channel-side.
Updates the Plug's Piece, too.
newPlug - The Plug to be connected.connectRight(cz.cuni.jagrlib.Plug)void connectRight(Plug newPlug)
Plug to the right Channel-side.
Updates the Plug's Piece, too.
newPlug - The Plug to be connected.connectLeft(cz.cuni.jagrlib.Plug)
void connectPro(Plug newPlug,
Plug proPlug)
Plug to the same Channel-side.
Updates the Plug's Piece, too.
newPlug - The Plug to be connected.proPlug - The Plug connected to the same side.connectAnti(cz.cuni.jagrlib.Plug, cz.cuni.jagrlib.Plug)
void connectAnti(Plug newPlug,
Plug antiPlug)
Plug to the opposite Channel-side.
Updates the Plug's Piece, too.
newPlug - The Plug to be connected.antiPlug - The Plug connected to the opposite side.connectPro(cz.cuni.jagrlib.Plug, cz.cuni.jagrlib.Plug)void disconnect(Plug oldPlug)
Plug from the Channel.
Updates the Plug's Piece, too.
oldPlug - The Plug to be disconnected.disconnectAll()void disconnectAll()
Plugs from the Channel.
Updates the Plug's Piece, too.
disconnect(cz.cuni.jagrlib.Plug)int getLeftCount()
Plugs connected to that side).getRightCount()int getRightCount()
Plugs connected to that side).getLeftCount()boolean isLeft(Plug oldPlug)
Plug connected to the left Channel-side?
oldPlug - The checked Plug.
Plug is connected to the left side.isRight(cz.cuni.jagrlib.Plug)boolean isRight(Plug oldPlug)
Plug connected to the right Channel-side?
oldPlug - The checked Plug.
Plug is connected to the right side.isLeft(cz.cuni.jagrlib.Plug)Plug[] getLeft()
Plugs).
Plugs connected to the left side.Plug[] getRight()
Plugs).
Plugs connected to the right side.Plug[] getPro(Plug proPlug)
Plugs).
proPlug - The Plug connected to the same side.
Plugs.Plug[] getAnti(Plug antiPlug)
Plugs).
antiPlug - The Plug connected to the opposite side.
Plugs.boolean prepare()
Channel to regular operation.
Channel is prepared
for operation).
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||