- 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:
RemoteServerImpl
public interface RemoteServer extends Remote
Remote control providing subjects to be operated on by
RemoteClient
instances.-
Nested Class Summary
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 booleanhasSubject(Object aSubject)Returns true if the provided subject is contained inside thisRemoteServer.booleanpublishSubject(Object aSubject)Publishes an object to anyRemoteClientconnected to theRemoteServer.booleansignOffSubject(Object aSubject)Tries to sign off the (previously published) subject, this can be vetoed in case the subject is still in use by aRemoteClient.booleansignOffSubject(Object aSubject, int aTimeoutInMs)Signs off the (previously published) subject, this be vetoed even in case the subject is still in use by aRemoteClient, but the veto will only delay the sign off by the given timeout.Iterator<Object>subjects()Returns an (immutable) iterator containing all the proxy objects previously being published.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
-
hasSubject
Returns true if the provided subject is contained inside thisRemoteServer.- Parameters:
aSubject- The subject to be tested if it is contained inside theRemoteServer.- Returns:
- True if the given subject is contained inside the
RemoteServer.
-
subjects
Returns an (immutable) iterator containing all the proxy objects previously being published. Use thesignOffSubject(Object)method in order to remove a published subject.- Returns:
- An iterator containing the published proxy objects.
-
publishSubject
Publishes an object to anyRemoteClientconnected to theRemoteServer.- Parameters:
aSubject- A subject being published for inter-process communication such as remote procedure calls or remote method invocations.- Returns:
- True is returned if the subject could be published, else false is returned
- Throws:
IOException- Thrown in case opening or accessing an open line (connection, junction, link) caused problems.
-
signOffSubject
Tries to sign off the (previously published) subject, this can be vetoed in case the subject is still in use by aRemoteClient.- Parameters:
aSubject- Description is currently not available!- Returns:
- True if the removal of the subject has been successful. If the
subject has not been found then false is returned. If a
RemoteClientthrew aVetoExceptionthen the sign-off is aborted. - Throws:
org.refcodes.exception.VetoException- the veto exceptionIOException- Thrown in case opening or accessing an open line (connection, junction, link) caused problems.
-
signOffSubject
Signs off the (previously published) subject, this be vetoed even in case the subject is still in use by aRemoteClient, but the veto will only delay the sign off by the given timeout.- Parameters:
aSubject- The subject to be signed off.aTimeoutInMs- The timeout to be granted in case the sign-off has been vetoed, nevertheless the subject will be signed off after the timeout elapsed.- Returns:
- True if the removal of the subject has been successful. If the
subject has not been found then false is returned. If a
RemoteClientthrew aVetoExceptionthen the sign-off is aborted. - Throws:
IOException- Thrown in case opening or accessing an open line (connection, junction, link) caused problems.
-