Package org.refcodes.remoting
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 aRemoteServer
.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
RemoteClient.ProxyControl
TheRemoteClient.ProxyControl
is 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.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
-
-
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 theRemoteClient
.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.component.Closable
close, closeIn, closeQuietly, closeUnchecked
-
Methods inherited from interface org.refcodes.component.ConnectionOpenable.ConnectionOpenAutomaton
isOpenable
-
-
-
-
Method Detail
-
hasProxy
boolean hasProxy(java.lang.Object aProxy)
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
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 anAmbiguousProxyException
even 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
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.
-
-