Search in sources :

Example 1 with ServiceAddress

use of com.yahoo.messagebus.network.ServiceAddress in project vespa by vespa-engine.

the class LocalNetwork method allocServiceAddress.

@Override
public boolean allocServiceAddress(RoutingNode recipient) {
    String service = recipient.getRoute().getHop(0).getServiceName();
    ServiceAddress address = wire.resolveServiceAddress(service);
    if (address == null) {
        recipient.setError(new Error(NO_ADDRESS_FOR_SERVICE, "No address for service '" + service + "'."));
        return false;
    }
    recipient.setServiceAddress(address);
    return true;
}
Also used : ServiceAddress(com.yahoo.messagebus.network.ServiceAddress) Error(com.yahoo.messagebus.Error) Utf8String(com.yahoo.text.Utf8String)

Aggregations

Error (com.yahoo.messagebus.Error)1 ServiceAddress (com.yahoo.messagebus.network.ServiceAddress)1 Utf8String (com.yahoo.text.Utf8String)1