public final class BNSService
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private NetChannelInput |
fromBNS
The incoming channel to receive messages from the BNS
|
private NetChannelOutput |
toBNS
The channel to send messages to the BNS upon
|
Constructor and Description |
---|
BNSService(NodeID bnsNode)
Creates a new BNSService
|
Modifier and Type | Method and Description |
---|---|
boolean |
register(java.lang.String name,
NetBarrier bar)
Registers a Server end of a NetBarrier with the BNS
|
NetBarrierLocation |
resolve(java.lang.String name)
Resolves a name on the BNS, retrieving the NetBarrierLocation for the NetBarrier
|
private final NetChannelOutput toBNS
private final NetChannelInput fromBNS
public BNSService(NodeID bnsNode) throws JCSPNetworkException
bnsNode
- The Node that the BNS is onJCSPNetworkException
- Thrown if something goes wrong in the underlying architecturepublic boolean register(java.lang.String name, NetBarrier bar)
name
- Name to register with BNSbar
- Barrier to registerpublic NetBarrierLocation resolve(java.lang.String name) throws JCSPNetworkException
name
- The name to resolve from the BNSJCSPNetworkException
- Thrown if something goes wrong in the underlying architecture