本文整理汇总了Java中com.ib.controller.ApiController.IBulletinHandler类的典型用法代码示例。如果您正苦于以下问题:Java IBulletinHandler类的具体用法?Java IBulletinHandler怎么用?Java IBulletinHandler使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
IBulletinHandler类属于com.ib.controller.ApiController包,在下文中一共展示了IBulletinHandler类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: connected
import com.ib.controller.ApiController.IBulletinHandler; //导入依赖的package包/类
@Override public void connected() {
show( "connected");
m_connectionPanel.m_status.setText( "connected");
controller().reqCurrentTime( new ITimeHandler() {
@Override public void currentTime(long time) {
show( "Server date/time is " + Formats.fmtDate(time * 1000) );
}
});
controller().reqBulletins( true, new IBulletinHandler() {
@Override public void bulletin(int msgId, NewsType newsType, String message, String exchange) {
String str = String.format( "Received bulletin: type=%s exchange=%s", newsType, exchange);
show( str);
show( message);
}
});
}
示例2: connected
import com.ib.controller.ApiController.IBulletinHandler; //导入依赖的package包/类
@Override public void connected() {
show( "connected");
m_connectionPanel.m_status.setText( "connected");
m_controller.reqCurrentTime( new ITimeHandler() {
@Override public void currentTime(long time) {
show( "Server date/time is " + Formats.fmtDate(time * 1000) );
}
});
m_controller.reqBulletins( true, new IBulletinHandler() {
@Override public void bulletin(int msgId, NewsType newsType, String message, String exchange) {
String str = String.format( "Received bulletin: type=%s exchange=%s", newsType, exchange);
show( str);
show( message);
}
});
}