本文整理匯總了Java中org.solmix.exchange.Transporter類的典型用法代碼示例。如果您正苦於以下問題:Java Transporter類的具體用法?Java Transporter怎麽用?Java Transporter使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
Transporter類屬於org.solmix.exchange包,在下文中一共展示了Transporter類的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: createTrasporter
import org.solmix.exchange.Transporter; //導入依賴的package包/類
protected ServletTransporter createTrasporter() throws IOException {
TransporterFactoryManager tf = this.container.getExtension(TransporterFactoryManager.class);
TransporterFactory transporterFactory = tf.getFactory(ServletTransportationFactory.DEFAULT_TRANSPORT_ID);
if (this.transporter == null) {
Transporter ts = transporterFactory.getTransporter(endpointInfo, container);
if (!(ts instanceof ServletTransporter)) {
throw new IllegalArgumentException();
}
this.transporter = (ServletTransporter) ts;
}
getLogger().info("create transporter on {}", endpointInfo.getAddress());
return this.transporter;
}
示例2: getTransporter
import org.solmix.exchange.Transporter; //導入依賴的package包/類
@Override
public Transporter getTransporter(EndpointInfo ei, Container container) throws IOException {
Assert.assertNotNull(ei, "EndpointInfo not null");
r.lock();
try {
return new ServletTransporter(container,ei,ei.getAddress());
} finally {
r.unlock();
}
}