org.objectweb.kilim.description
Class Port

java.lang.Object
  extended byorg.objectweb.kilim.description.TemplateElementImpl
      extended byorg.objectweb.kilim.description.BasicNamedElementImpl
          extended byorg.objectweb.kilim.description.Port
All Implemented Interfaces:
BasicElement, BasicNamedElement, java.lang.Cloneable, NamedElement, TemplateElement

public class Port
extends BasicNamedElementImpl

Author:
horn

Field Summary
private  Arity arity
           
private  boolean isOffered
           
static Port THIS_PORT
          a constant associated to the "this" port, a port bound to the Component object
 
Fields inherited from class org.objectweb.kilim.description.BasicNamedElementImpl
 
Fields inherited from class org.objectweb.kilim.description.TemplateElementImpl
 
Constructor Summary
private Port()
           
  Port(java.lang.String aName, Arity aArity, int aStatus, boolean isP, TemplateDescription aTemplate)
          The public constructor for a port.
 
Method Summary
 Arity getArity()
          Returns the arity.
 int getKind()
          returns the element kind.
 boolean isOffered()
          returns whether the port is offered or not.
 boolean isOptional()
           
 boolean isUnary()
           
 void setArity(Arity anArity)
          Sets the arity.
 void setLocalName(java.lang.String aName)
          sets a name to the element.
 void setStatus(int aStatus)
          sets the element status.
 
Methods inherited from class org.objectweb.kilim.description.BasicNamedElementImpl
getLocalName, getStatus, isEventSource, performsAction, providesValue, setContainingTemplate, toString
 
Methods inherited from class org.objectweb.kilim.description.TemplateElementImpl
clone, getContainingTemplate, getTemplateDefHierarchy
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.objectweb.kilim.description.TemplateElement
clone, getContainingTemplate, getTemplateDefHierarchy
 

Field Detail

THIS_PORT

public static final Port THIS_PORT
a constant associated to the "this" port, a port bound to the Component object


arity

private Arity arity

isOffered

private boolean isOffered
Constructor Detail

Port

public Port(java.lang.String aName,
            Arity aArity,
            int aStatus,
            boolean isP,
            TemplateDescription aTemplate)
     throws KilimException
The public constructor for a port.

Parameters:
aName - : the local name of the port.
aArity - : the arity of the port.
aStatus - : the status of the port. It should be one of KILIM.PRIVATE, KILIM.PROTECTED, KILIM.PUBLIC.
isP - : true if the port is offered, false if not.
aTemplate - : the template in which the port is defined.
Throws:
KilimException - : generated if aName or aTemplate is null, or if aStatus has an illegal value,

Port

private Port()
Method Detail

isOffered

public boolean isOffered()
returns whether the port is offered or not.

Returns:
boolean

getKind

public int getKind()
Description copied from interface: BasicElement
returns the element kind.

Returns:
int
See Also:
BasicElement.getKind()

setLocalName

public void setLocalName(java.lang.String aName)
                  throws KilimException
Description copied from interface: NamedElement
sets a name to the element.

Specified by:
setLocalName in interface NamedElement
Overrides:
setLocalName in class BasicNamedElementImpl
Throws:
KilimException
See Also:
NamedElement.setLocalName(String)

setStatus

public void setStatus(int aStatus)
               throws KilimException
Description copied from interface: NamedElement
sets the element status.

Specified by:
setStatus in interface NamedElement
Overrides:
setStatus in class BasicNamedElementImpl
Throws:
KilimException
See Also:
NamedElement.setStatus(int)

isOptional

public boolean isOptional()
See Also:
isOptional()

isUnary

public boolean isUnary()
See Also:
isUnary()

getArity

public Arity getArity()
Returns the arity.

Returns:
Arity

setArity

public void setArity(Arity anArity)
              throws KilimException
Sets the arity.

Parameters:
anArity - The arity to set
Throws:
KilimException - :