Package gov.cca.ports

Interface PrintfPort

All Superinterfaces:
Port

public interface PrintfPort extends Port
PrintfPort for use in building components. A just-print-it port. Tremendously useful. The framework implementation of this port is very likely to do things such as direct the out, error, and log channels to line-oriented files or gui windows or /dev/null under the covers. These are intended for debugging and control information, not bulk data transfer. The design, or lack thereof, is to be expected from C coders hacking in java. The clued world is invited to do better, define a cerr/cout/clog port, etc. We contemplate 3 devices (at least for prototyping purposes) The OUT device "p" is likely to be used to communicate back to UI's from 'special' components. The ERROR device "e" is likely to be echoed to a user but not otherwise interpretted. The LOG device is likely to be directed to a logging service or raw file and not seen by anybody ever. It is good practice for components implementing this interface to return immediately (minimizing cost) if noone is listening even though the component insists on talking.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    e(String s)
    Output a string on err device
    void
    Output a string on err device with added \n
    void
    l(String s)
    Output a string on log device
    void
    Output a string on log device with added \n
    void
    p(String s)
    Output a string on out device
    void
    Output a string on out device with added \n
  • Method Details

    • p

      void p(String s)
      Output a string on out device
    • pn

      void pn(String s)
      Output a string on out device with added \n
    • e

      void e(String s)
      Output a string on err device
    • en

      void en(String s)
      Output a string on err device with added \n
    • l

      void l(String s)
      Output a string on log device
    • ln

      void ln(String s)
      Output a string on log device with added \n