Package org.jcsp.lang

Class One2OneConnectionImpl<T>

java.lang.Object
org.jcsp.lang.AbstractConnectionImpl
org.jcsp.lang.One2OneConnectionImpl<T>
All Implemented Interfaces:
One2OneConnection<T>

class One2OneConnectionImpl<T> extends AbstractConnectionImpl implements One2OneConnection<T>
This class is an implementation of One2OneConnection. Each end is safe to be used by one thread at a time.
  • Field Details

  • Constructor Details

    • One2OneConnectionImpl

      public One2OneConnectionImpl()
      Initializes all the attributes to necessary values. Channels are created using the static factory in the ChannelServer inteface. Constructor for One2OneConnectionImpl.
  • Method Details

    • client

      public AltingConnectionClient<T> client()
      Returns the AltingConnectionClient that can be used by a single process at any instance. This method will always return the same AltingConnectionClient object. One2OneConnection is only intendended to have two ends.
      Specified by:
      client in interface One2OneConnection<T>
      Returns:
      the AltingConnectionClient object.
    • server

      public AltingConnectionServer<T> server()
      Returns the AltingConnectionServer that can be used by a single process at any instance. This method will always return the same AltingConnectionServer object. One2OneConnection is only intendended to have two ends.
      Specified by:
      server in interface One2OneConnection<T>
      Returns:
      the AltingConnectionServer object.