Interface RemoteClient

  • All Superinterfaces:
    org.refcodes.mixin.BusyAccessor, org.refcodes.structure.Clearable, org.refcodes.component.Closable, org.refcodes.component.Closable.CloseAutomaton, org.refcodes.component.ClosedAccessor, org.refcodes.component.Component, org.refcodes.component.ConnectableComponent, org.refcodes.component.ConnectableComponent.ConnectableAutomaton, org.refcodes.component.ConnectionComponent<org.refcodes.io.DatagramTransceiver<java.io.Serializable>>, org.refcodes.component.ConnectionComponent.ConnectionAutomaton<org.refcodes.io.DatagramTransceiver<java.io.Serializable>>, org.refcodes.component.ConnectionOpenable<org.refcodes.io.DatagramTransceiver<java.io.Serializable>>, org.refcodes.component.ConnectionOpenable.ConnectionOpenAutomaton<org.refcodes.io.DatagramTransceiver<java.io.Serializable>>, org.refcodes.component.ConnectionStatusAccessor, org.refcodes.structure.Containable, org.refcodes.component.Destroyable, org.refcodes.component.OpenedAccessor, Remote
    All Known Implementing Classes:
    RemoteClientImpl

    public interface RemoteClient
    extends Remote
    Remote control providing subjects to be operated on by a RemoteServer.
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Interface Description
      static interface  RemoteClient.ProxyControl
      The RemoteClient.ProxyControl is used to manage a proxy being provided from a subject be the RemoteServer.
      • Nested classes/interfaces inherited from interface org.refcodes.mixin.BusyAccessor

        org.refcodes.mixin.BusyAccessor.BusyMutator, org.refcodes.mixin.BusyAccessor.BusyProperty
      • Nested classes/interfaces inherited from interface org.refcodes.component.Closable

        org.refcodes.component.Closable.CloseAutomaton, org.refcodes.component.Closable.CloseBuilder<B extends org.refcodes.component.Closable.CloseBuilder<B>>
      • Nested classes/interfaces inherited from interface org.refcodes.component.ClosedAccessor

        org.refcodes.component.ClosedAccessor.ClosedMutator, org.refcodes.component.ClosedAccessor.ClosedProperty
      • Nested classes/interfaces inherited from interface org.refcodes.component.ConnectableComponent

        org.refcodes.component.ConnectableComponent.ConnectableAutomaton
      • Nested classes/interfaces inherited from interface org.refcodes.component.ConnectionComponent

        org.refcodes.component.ConnectionComponent.ConnectionAutomaton<CON extends java.lang.Object>, org.refcodes.component.ConnectionComponent.ConnectionComponentBuilder<CON extends java.lang.Object,B extends org.refcodes.component.ConnectionComponent.ConnectionComponentBuilder<CON,B>>
      • Nested classes/interfaces inherited from interface org.refcodes.component.ConnectionOpenable

        org.refcodes.component.ConnectionOpenable.ConnectionOpenAutomaton<CON extends java.lang.Object>, org.refcodes.component.ConnectionOpenable.ConnectionOpenBuilder<CON extends java.lang.Object,B extends org.refcodes.component.ConnectionOpenable.ConnectionOpenBuilder<CON,B>>
      • Nested classes/interfaces inherited from interface org.refcodes.component.ConnectionStatusAccessor

        org.refcodes.component.ConnectionStatusAccessor.ConnectionStatusMutator, org.refcodes.component.ConnectionStatusAccessor.ConnectionStatusProperty
      • Nested classes/interfaces inherited from interface org.refcodes.component.Destroyable

        org.refcodes.component.Destroyable.DestroyAutomaton
      • Nested classes/interfaces inherited from interface org.refcodes.component.OpenedAccessor

        org.refcodes.component.OpenedAccessor.OpenedMutator, org.refcodes.component.OpenedAccessor.OpenedProperty
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      <T> T getProxy​(java.lang.Class<T> aType)
      Returns the proxy which can be cast to the given type.
      boolean hasProxy​(java.lang.Class<?> aType)
      Returns true if there is at least one proxy of the given type.
      boolean hasProxy​(java.lang.Object aProxy)
      Returns true if the provided proxy is contained inside the RemoteClient.
      java.util.Iterator<java.lang.Object> proxies()
      Returns a read-only iterator containing all the proxy objects previously being published.
      boolean signOffProxy​(java.lang.Object proxy)
      Signs off an instance previously published using the publishClassDescriptor() method.
      • Methods inherited from interface org.refcodes.mixin.BusyAccessor

        isBusy
      • Methods inherited from interface org.refcodes.structure.Clearable

        clear
      • Methods inherited from interface org.refcodes.component.Closable

        close, closeIn, closeQuietly, closeUnchecked
      • Methods inherited from interface org.refcodes.component.Closable.CloseAutomaton

        isClosable
      • Methods inherited from interface org.refcodes.component.ClosedAccessor

        isClosed
      • Methods inherited from interface org.refcodes.component.ConnectionOpenable

        open, openUnchecked
      • Methods inherited from interface org.refcodes.component.ConnectionOpenable.ConnectionOpenAutomaton

        isOpenable
      • Methods inherited from interface org.refcodes.component.ConnectionStatusAccessor

        getConnectionStatus, isConnectionOpened
      • Methods inherited from interface org.refcodes.structure.Containable

        isEmpty, size
      • Methods inherited from interface org.refcodes.component.Destroyable

        destroy
      • Methods inherited from interface org.refcodes.component.OpenedAccessor

        isOpened
    • Method Detail

      • hasProxy

        boolean hasProxy​(java.lang.Object aProxy)
        Returns true if the provided proxy is contained inside the RemoteClient.
        Parameters:
        aProxy - The proxy to be tested if it is contained inside the RemoteClient.
        Returns:
        True if the given proxy is contained inside the RemoteClient.
      • proxies

        java.util.Iterator<java.lang.Object> proxies()
        Returns a read-only iterator containing all the proxy objects previously being published. Use the sign-off methods in order to remove a published proxy object.
        Returns:
        An iterator containing the published proxy objects.
      • hasProxy

        boolean hasProxy​(java.lang.Class<?> aType)
        Returns true if there is at least one proxy of the given type.
        Parameters:
        aType - the type
        Returns:
        True in case there is at least one proxy of the given type.
      • getProxy

        <T> T getProxy​(java.lang.Class<T> aType)
                throws AmbiguousProxyException,
                       NoSuchProxyException
        Returns the proxy which can be cast to the given type. Note that this method may throw an AmbiguousProxyException even if hasProxy(Class) returns true! The method hasProxy(Class) returns true in case at least one proxy of the given type was found whereas this method only returns a proxy in case there is exactly one proxy of the required type is present.
        Type Parameters:
        T - the generic type
        Parameters:
        aType - the type
        Returns:
        The proxy for an instance of the given type.
        Throws:
        AmbiguousProxyException - Thrown in case a proxy for a given type was requested but more than one proxies matched the requested type.
        NoSuchProxyException - Thrown in case a proxy for a given type was requested but not any proxy matched the requested type.
      • signOffProxy

        boolean signOffProxy​(java.lang.Object proxy)
                      throws org.refcodes.component.OpenException
        Signs off an instance previously published using the publishClassDescriptor() method.
        Parameters:
        proxy - An object of type GenericInstanceDescriptor containing the information needed to sign-off an instance.
        Returns:
        True is returned if the instance described by the proxy object could be signed off, else false is returned
        Throws:
        org.refcodes.component.OpenException - Thrown in case opening or accessing an open line (connection, junction, link) caused problems.