- All Superinterfaces:
org.refcodes.mixin.BusyAccessor,org.refcodes.mixin.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<Serializable>>,org.refcodes.component.ConnectionComponent.ConnectionAutomaton<org.refcodes.io.DatagramTransceiver<Serializable>>,org.refcodes.component.ConnectionOpenable<org.refcodes.io.DatagramTransceiver<Serializable>>,org.refcodes.component.ConnectionOpenable.ConnectionOpenAutomaton<org.refcodes.io.DatagramTransceiver<Serializable>>,org.refcodes.component.ConnectionStatusAccessor,org.refcodes.struct.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 interfaceRemoteClient.ProxyControlTheRemoteClient.ProxyControlis used to manage a proxy being provided from a subject be theRemoteServer.Nested classes/interfaces inherited from interface org.refcodes.mixin.BusyAccessor
org.refcodes.mixin.BusyAccessor.BusyMutator, org.refcodes.mixin.BusyAccessor.BusyPropertyNested 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.ClosedPropertyNested classes/interfaces inherited from interface org.refcodes.component.ConnectableComponent
org.refcodes.component.ConnectableComponent.ConnectableAutomatonNested classes/interfaces inherited from interface org.refcodes.component.ConnectionComponent
org.refcodes.component.ConnectionComponent.ConnectionAutomaton<CON extends Object>, org.refcodes.component.ConnectionComponent.ConnectionComponentBuilder<CON extends 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 Object>, org.refcodes.component.ConnectionOpenable.ConnectionOpenBuilder<CON extends 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.ConnectionStatusPropertyNested classes/interfaces inherited from interface org.refcodes.component.Destroyable
org.refcodes.component.Destroyable.DestroyAutomatonNested classes/interfaces inherited from interface org.refcodes.component.OpenedAccessor
org.refcodes.component.OpenedAccessor.OpenedMutator, org.refcodes.component.OpenedAccessor.OpenedProperty -
Method Summary
Modifier and Type Method Description <T> TgetProxy(Class<T> aType)Returns the proxy which can be cast to the given type.booleanhasProxy(Class<?> aType)Returns true if there is at least one proxy of the given type.booleanhasProxy(Object aProxy)Returns true if the provided proxy is contained inside theRemoteClient.Iterator<Object>proxies()Returns a read-only iterator containing all the proxy objects previously being published.booleansignOffProxy(Object proxy)Signs off an instance previously published using the publishClassDescriptor() method.Methods inherited from interface org.refcodes.mixin.BusyAccessor
isBusyMethods inherited from interface org.refcodes.mixin.Clearable
clearMethods inherited from interface org.refcodes.component.Closable
close, closeIn, closeQuietly, closeUncheckedMethods inherited from interface org.refcodes.component.Closable.CloseAutomaton
isClosableMethods inherited from interface org.refcodes.component.ClosedAccessor
isClosedMethods inherited from interface org.refcodes.component.ConnectionOpenable
open, openUncheckedMethods inherited from interface org.refcodes.component.ConnectionOpenable.ConnectionOpenAutomaton
isOpenableMethods inherited from interface org.refcodes.component.ConnectionStatusAccessor
getConnectionStatus, isOpenedMethods inherited from interface org.refcodes.struct.Containable
isEmpty, sizeMethods inherited from interface org.refcodes.component.Destroyable
destroy
-
Method Details
-
hasProxy
Returns true if the provided proxy is contained inside theRemoteClient.- Parameters:
aProxy- The proxy to be tested if it is contained inside theRemoteClient.- Returns:
- True if the given proxy is contained inside the
RemoteClient.
-
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
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
Returns the proxy which can be cast to the given type. Note that this method may throw anAmbiguousProxyExceptioneven ifhasProxy(Class)returns true! The methodhasProxy(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
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:
IOException- Thrown in case opening or accessing an open line (connection, junction, link) caused problems.
-