}
}
}
static public void attach(final VirtualHost host, final UTF8Buffer client_id, final MqttProtocolHandler handler) {
queue.execute(new Task() {
@Override
public void run() {
final HostState host_state = host.plugin_state(
Scala2Java.toScala(new Fn0<HostState>(){
@Override
public HostState apply() {
return new HostState(host);
}
}),
HostState.class);
host_state.on_load(new Task() {
@Override
public void run() {
MqttSession assignment = host_state.sessions.get(client_id);
if (assignment != null) {
assignment.connect(handler);