Class TimeStamper

java.lang.Object
gov.cca.eg.component.TimeStamper
All Implemented Interfaces:
Component, StringConsumerPort, Port

public class TimeStamper extends Object implements Component, StringConsumerPort
A CCA component that implements and provides StringConsumerPort, and uses a StringConsumerPort.
  • Constructor Summary

    Constructors
    Constructor
    Description
    CCA Component must have a null constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Services implementation: this is the one and only method that makes this component a CCAComponent.
    void
    Implements the StringConsumerPort: takes a given string Stamps it with the time and shoves it out the UsesPort "out0".

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • TimeStamper

      public TimeStamper()
      CCA Component must have a null constructor.
  • Method Details

    • setServices

      public void setServices(Services svc)
      Services implementation: this is the one and only method that makes this component a CCAComponent.
      Specified by:
      setServices in interface Component
    • setString

      public void setString(String s)
      Implements the StringConsumerPort: takes a given string Stamps it with the time and shoves it out the UsesPort "out0".
      Specified by:
      setString in interface StringConsumerPort