use of com.zx.sms.session.AbstractSessionStateManager in project SMSGate by Lihuanghe.
the class AbstractEndpointConnector method synwrite.
public <T extends BaseMessage> List<Promise<T>> synwrite(List<T> msgs) {
Channel ch = fetchOneWritable();
if (ch == null)
return null;
AbstractSessionStateManager session = (AbstractSessionStateManager) ch.pipeline().get(sessionHandler);
if (session == null)
return null;
List<Promise<T>> arrPromise = new ArrayList<Promise<T>>();
for (BaseMessage msg : msgs) {
arrPromise.add(session.writeMessagesync(msg));
}
return arrPromise;
}
use of com.zx.sms.session.AbstractSessionStateManager in project SMSGate by Lihuanghe.
the class AbstractEndpointConnector method synwrite.
public <T extends BaseMessage> Promise<T> synwrite(T message) {
Channel ch = fetchOneWritable();
if (ch == null)
return null;
AbstractSessionStateManager session = (AbstractSessionStateManager) ch.pipeline().get(sessionHandler);
return session.writeMessagesync(message);
}
Aggregations