Package org.refcodes.remoting
Interface RemoteServer
-
- 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:
RemoteServerImpl
public interface RemoteServer extends Remote
Remote control providing subjects to be operated on byRemoteClient
instances.
-
-
Nested Class Summary
-
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 boolean
hasSubject(java.lang.Object aSubject)
Returns true if the provided subject is contained inside thisRemoteServer
.boolean
publishSubject(java.lang.Object aSubject)
Publishes an object to anyRemoteClient
connected to theRemoteServer
.boolean
signOffSubject(java.lang.Object aSubject)
Tries to sign off the (previously published) subject, this can be vetoed in case the subject is still in use by aRemoteClient
.boolean
signOffSubject(java.lang.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.java.util.Iterator<java.lang.Object>
subjects()
Returns an (immutable) iterator containing all the proxy objects previously being published.-
Methods inherited from interface org.refcodes.component.Closable
close, closeIn, closeQuietly, closeUnchecked
-
Methods inherited from interface org.refcodes.component.ConnectionOpenable.ConnectionOpenAutomaton
isOpenable
-
-
-
-
Method Detail
-
hasSubject
boolean hasSubject(java.lang.Object aSubject)
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
java.util.Iterator<java.lang.Object> 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
boolean publishSubject(java.lang.Object aSubject) throws org.refcodes.component.OpenException
Publishes an object to anyRemoteClient
connected 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:
org.refcodes.component.OpenException
- Thrown in case opening or accessing an open line (connection, junction, link) caused problems.
-
signOffSubject
boolean signOffSubject(java.lang.Object aSubject) throws org.refcodes.exception.VetoException, org.refcodes.component.OpenException
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
RemoteClient
threw aVetoException
then the sign-off is aborted. - Throws:
org.refcodes.exception.VetoException
- the veto exceptionorg.refcodes.component.OpenException
- Thrown in case opening or accessing an open line (connection, junction, link) caused problems.
-
signOffSubject
boolean signOffSubject(java.lang.Object aSubject, int aTimeoutInMs) throws org.refcodes.component.OpenException
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
RemoteClient
threw aVetoException
then the sign-off is aborted. - Throws:
org.refcodes.component.OpenException
- Thrown in case opening or accessing an open line (connection, junction, link) caused problems.
-
-