|
JMACS | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IDi
device interface (DI). The following runtime configuration properties are used:
Name | Default value | Desc. |
---|---|---|
org.jmacs.target.hostname | localhost | name of target JMACS server's host |
org.jmacs.target.isLocal | true | whether or not the DI's host should be considered to be on the target JMACS server host's local network |
org.jmacs.di.port | 0 (next available) | port on which DI remote-objects will be exported |
Note that the above target-related properties may be overridden in
specific cases. See IDi.AbstractFactory.createDi(String, Class, String,
String, Serializable)
for details.
Instances must be in their IDi.States.UNREGISTERED
state (as they are
initially) when being discarded, and should be assumed to contain at least one
non-daemon thread when in other states.
Thread-safety may not be assumed. The result of calling methods out of turn is undefined.
Nested Class Summary | |
---|---|
static class |
IDi.AbstractFactory
for creating IDi instances. |
static interface |
IDi.IDriver
device-interface (DI) driver. |
static interface |
IDi.States
of the IDi . |
static class |
IDi.Util
utility class. |
Method Summary | |
---|---|
boolean |
getAutoReregister()
returns this property. |
Observable |
getObservable()
returns observable. |
String |
getState()
returns one of the fields of IDi.States . |
void |
register()
registers with the target. |
void |
registerLater()
as register() , but guaranteed to return, immediately. |
void |
registerOrWait()
as register() , but enters a sleep-retry loop if the target is
unavailable (rather than throwing an exception). |
void |
setAutoReregister(boolean b)
sets automatic re-registration (in case the target should become unavailable for any reason). |
void |
setSamplesInPort(int port)
sets a designated local port to which the socket that will be created to receive subscription status samples must bind. |
void |
setSamplesOutPort(int port)
sets a designated local port to which the socket that will be created to send status samples must bind. |
void |
unregister()
return the instance to the IDi.States.UNREGISTERED state. |
Method Detail |
---|
void setSamplesOutPort(int port)
IllegalStateException
- if called when not unboundvoid setSamplesInPort(int port)
IllegalStateException
- if called when not unboundvoid setAutoReregister(boolean b)
boolean getAutoReregister()
void register() throws DiNameTakenException, TargetUnavailableException
DiNameTakenException
- if another DI is already registered as name
TargetUnavailableException
- if the target DI-registry is unavailablevoid registerOrWait() throws DiNameTakenException, InterruptedException
register()
, but enters a sleep-retry loop if the target is
unavailable (rather than throwing an exception).
InterruptedException
- if interrupted while sleeping
DiNameTakenException
void registerLater()
register()
, but guaranteed to return, immediately.
void unregister()
IDi.States.UNREGISTERED
state. (Instances are
required to be in this state when being discarded.)
String getState()
IDi.States
.
Observable getObservable()
IDi.States
to be supplied as the arg when impl'ting
Observer.update(Observable, Object)
.
|
JMACS | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |