|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--osl.nameservice.simple.DefaultNameService
This class defines the "default" implementation of the NameService interface. The default implementation correponds to the original implementation of the nameservice in the ActorManager defined in version 1.0b of the foundry. If you are planning on supporting fault-tolerant foundry nodes, or if you expect actors to migrate quite often (e.g. after every message processed) then this is not a terribly great nameservice to use. However, this nameservice SHOULD be useful for most common actor programs.
Name,
NameService,
RequestHandler,
DefaultName| Constructor Summary | |
DefaultNameService()
The default constructor. |
|
| Method Summary | |
void |
nsAddAddress(PhysicalAddress addr)
Add a new address for authoritative bindings. |
void |
nsClear(Name naum)
Instructs the nameservice to clear non-authoritative about the given name. |
Name |
nsGenerateName()
Request a fresh name from the name service. |
void |
nsInitialize(Scheduler S)
This function is required by the interface but will always return a runtime error. |
void |
nsInitialize(Scheduler S,
TransportLayer T)
Initialize this nameservice instance. |
boolean |
nsLocal(Name namu,
PhysicalAddress localBind)
Requests the nameservice to determine whether or not the given name is bound locally to the given physical address. |
PhysicalAddress |
nsLookup(Name namu)
Requests the nameservice to resolve the binding of the given name. |
void |
nsRegister(Name namu,
PhysicalAddress addr)
Bind the given name to the given physical address. |
void |
nsRemove(Name namu,
PhysicalAddress addr)
Remove a binding between a name and a physical address. |
void |
transportException(TransportInstance target,
TransportMessage msg,
TransportException error)
Called if the transport layer encounters an exception while attempting to send a previously queued message. |
void |
transportReceive(TransportInstance target,
TransportMessage msg)
Called by our transport layer when a new message has been received for this nameservice instance. |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
| Constructor Detail |
public DefaultNameService()
| Method Detail |
public void nsInitialize(Scheduler S)
S - A reference to the scheduler which should be
used to schedule nameservice threads.
public void nsInitialize(Scheduler S,
TransportLayer T)
S - A reference to the scheduler which should be
used to schedule nameservice threads.T - A reference to the transport layer which should
be used for interactions between nameservice instances.public void nsAddAddress(PhysicalAddress addr)
addr - A PhysicalAddress which may be used
for authoritative bindings.public Name nsGenerateName()
public void nsRegister(Name namu,
PhysicalAddress addr)
throws MalformedNameException,
NoSuchAddressException
namu - The Name instance to bind.addr - The PhysicalAddress which the name
argument should be bound to. Henceforth, this addr will
be a valid target for any messages sent to namu.
public void nsRemove(Name namu,
PhysicalAddress addr)
throws MalformedNameException,
NameNotFoundException,
NoSuchAddressException
namu - The Name to unbind.addr - The PhysicalAddress which should no
longer be associated with this name.
public PhysicalAddress nsLookup(Name namu)
throws MalformedNameException,
NameNotFoundException,
NoBindingException
namu - The Name instance to be resolved.
public boolean nsLocal(Name namu,
PhysicalAddress localBind)
throws MalformedNameException,
NoSuchAddressException
namu - The Name to be looked up.localBind - The PhysicalAddress which
should be verified as a local binding of the given name.
public void nsClear(Name naum)
throws MalformedNameException
namu - The Name for which
non-authoritative information should be cleared.
public void transportReceive(TransportInstance target,
TransportMessage msg)
target - The TransportInstance reference
that this message is targeted for. By assumption, the client is
the owner of this instance.msg - The TransportMessage that was received
for this connection.
public void transportException(TransportInstance target,
TransportMessage msg,
TransportException error)
target - The TransportInstance reference
that the original message was sent from. By assumption, the
client is the owner of this instance.msg - The original TransportMessage that was
queued to be sent to the remote host.error - The TransportException which
encapsulates the error encountered during transmission.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||