this.uidService = (UIDService) serviceBroker.getService( this, UIDService.class, null); if (uidService == null) { throw new RuntimeException( "Unable to obtain UIDService"); }
    private void initSourceAndTarget() throws TechSpecNotFoundException {        //** This is intended to be called once when the first instance is created.        //** However, it can be called again if values are lost for some reason, e.g.        //   the object is moved to another node & the target needs to be reset.                if (serviceBroker == null) {            throw new TechSpecNotFoundException("ServiceBroker is null.");                    }                if (agentId != null && nodeId != null)  { return; } //nothing to do.                // **********************************************get the agentId        AgentIdentificationService agentIdService =                (AgentIdentificationService) serviceBroker.getService(this, AgentIdentificationService.class, null);        if (agentIdService == null) {            throw new RuntimeException(            "Unable to obtain agent-id service");        }        this.agentId = agentIdService.getMessageAddress();        serviceBroker.releaseService(this, AgentIdentificationService.class, agentIdService);        if (agentId == null) {            throw new RuntimeException(            "Unable to obtain agent id");        }                // **********************************************get the nodeId        NodeIdentificationService nodeIdService = (NodeIdentificationService)            serviceBroker.getService(this, NodeIdentificationService.class, null);        if (nodeIdService == null) {            throw new RuntimeException("Unable to obtain node-id service");        }        nodeId = nodeIdService.getMessageAddress();        serviceBroker.releaseService(this, NodeIdentificationService.class, agentIdService);        if (nodeId == null) {            throw new RuntimeException(            "Unable to obtain agent id");        }    }