guarana.framework.port
Class TwoWayPort

java.lang.Object
  extended by guarana.util.observer.smart.SmartObservable
      extended by guarana.framework.port.Port
          extended by guarana.framework.port.TwoWayPort
All Implemented Interfaces:
ISource, ITaskContainer, guarana.util.observer.smart.ISmartObserver
Direct Known Subclasses:
ResponderPort, SolicitorPort

public abstract class TwoWayPort
extends Port

A generic communication port to solicit or respond for resources.

Since:
Guaranį SDK 1.0.0
Author:
Rafael Z. Frantz

Constructor Summary
TwoWayPort(String name)
          Constructs a new two way port with the given name.
TwoWayPort(String name, Process process)
          Constructs a two way port with the given name and associates it with the given process.
 
Method Summary
 Slot getInterSlotIn()
          Returns the interslot used by this port to receive messages from a process.
 Slot getInterSlotOut()
          Returns the interslot used by this port to send messages to a process.
 void setInterSlotIn(Slot interSlot)
          Sets the interslot used by this port to receive messages from a process.
 void setInterSlotOut(Slot interSlot)
          Sets the interslot used by this port to send messages to a process.
 
Methods inherited from class guarana.framework.port.Port
addPreScheduledTask, addTask, containsPreScheduledTasks, containsTask, countTask, getAllTasks, getCommunicator, getName, getProcess, getTask, initialise, pollPreScheduledTasks, removeTask, setCommunicator, setName, setProcess, update
 
Methods inherited from class guarana.util.observer.smart.SmartObservable
addSmartObserver, containsSmartObserver, containsSmartObserver, countSmartObservers, deleteSmartObserver, deleteSmartObservers, hasChanged, notifySmartObservers, notifySmartObservers
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TwoWayPort

public TwoWayPort(String name)
Constructs a new two way port with the given name.

Parameters:
name - The name of this new port.

TwoWayPort

public TwoWayPort(String name,
                  Process process)
Constructs a two way port with the given name and associates it with the given process.

Parameters:
name - The name of this new port.
process - The process to which this port will belong.
Method Detail

setInterSlotIn

public void setInterSlotIn(Slot interSlot)
                    throws InvalidParameterException
Sets the interslot used by this port to receive messages from a process. This slot is shared with a process.

Parameters:
interSlot - The interSlot.
Throws:
InvalidParameterException - if the interSlot parameter is null.

getInterSlotIn

public Slot getInterSlotIn()
Returns the interslot used by this port to receive messages from a process.

Returns:
the interslot.

setInterSlotOut

public void setInterSlotOut(Slot interSlot)
                     throws InvalidParameterException
Sets the interslot used by this port to send messages to a process. This slot is shared with a process.

Parameters:
interSlot - The interSlot.
Throws:
InvalidParameterException - if the interSlot parameter is null.

getInterSlotOut

public Slot getInterSlotOut()
Returns the interslot used by this port to send messages to a process.

Returns:
the interslot.


Guaranį DSL Home