use of org.bimserver.shared.pb.ProtocolBuffersReflector in project BIMserver by opensourceBIM.
the class ProtocolBuffersChannel method connect.
public void connect(TokenHolder tokenHolder) throws ChannelConnectionException {
protocolBuffersChannel = new SocketProtocolBuffersChannel(tokenHolder);
protocolBuffersChannel.registerConnectDisconnectListener(this);
ProtocolBuffersReflector reflector = new ProtocolBuffersReflector(protocolBuffersMetaData, servicesMap, protocolBuffersChannel);
for (Class<? extends PublicInterface> interface1 : servicesMap.getInterfaceClasses()) {
PublicInterface createReflector = reflectorFactory.createReflector(interface1, reflector);
add(interface1.getName(), createReflector);
}
finish(reflector, reflectorFactory);
try {
protocolBuffersChannel.connect(new InetSocketAddress(address, port));
} catch (IOException e) {
throw new ChannelConnectionException(e);
}
}
Aggregations