public MetaMessageSessionFactory(final MetaClientConfig metaClientConfig) throws MetaClientException {
super();
try {
this.checkConfig(metaClientConfig);
this.metaClientConfig = metaClientConfig;
final ClientConfig clientConfig = new ClientConfig();
clientConfig.setTcpNoDelay(TCP_NO_DELAY);
clientConfig.setMaxReconnectTimes(MAX_RECONNECT_TIMES);
clientConfig.setWireFormatType(new MetamorphosisWireFormatType());
clientConfig.setMaxScheduleWrittenBytes(MAX_SCHEDULE_WRITTEN_BYTES);
try {
this.remotingClient = new RemotingClientWrapper(RemotingFactory.connect(clientConfig));
}
catch (final NotifyRemotingException e) {
throw new NetworkException("Create remoting client failed", e);