Skip to content

Instantly share code, notes, and snippets.

View GLitchfield's full-sized avatar

Gavin M Litchfield GLitchfield

  • Maxpoint
  • Raleigh, NC
View GitHub Profile
public class BarchartMarketplaceReplay extends BarchartMarketplace {
public BarchartMarketplaceReplay(final int socketAddress) {
super("", "");
this.connection = new HistoricReplayListenerClientDDF(socketAddress,
Executors.newCachedThreadPool(
new ThreadFactory() {
public class BarchartMarketplaceReplay extends BarchartMarketplace {
public BarchartMarketplaceReplay(final int socketAddress) {
super("", "");
maker = DDF_Marketplace.newInstance(new DummySubHandler());
}
public void handleMessage(final DDF_BaseMessage message) {
final static byte encodeTimeStampByte(final int timeField) {
return (byte) (timeField | DDF_TIME_STAMP_MASK);
}
//
// /** time zone information is discarded */
static final void encodeTimeStamp(final ReadableDateTime dateTime, final ByteBuffer buffer) {
// base fields
buffer.put(DDF_CENTURY); // century
buffer.put(encodeTimeStampByte(dateTime.getYearOfCentury())); // year
static final ReadableDateTime dateFromString(final String time) {
MutableDateTime t = new MutableDateTime();
t.setYear(Integer.parseInt(time.subSequence(0,4).toString()));
t.setMonthOfYear(Integer.parseInt(time.subSequence(4,6).toString()));
t.setDayOfMonth(Integer.parseInt(time.subSequence(6,8).toString()));
t.setHourOfDay(Integer.parseInt(time.subSequence(8,10).toString()));
t.setMinuteOfHour(Integer.parseInt(time.subSequence(10, 12).toString()));
t.setSecondOfMinute(Integer.parseInt(time.subSequence(12,14).toString()));
t.setMillisOfSecond(Integer.parseInt(time.subSequence(14,17).toString()));
HTTP Status 500 - Request processing failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'scopedTarget.marketplace-protectedRequestContext': Invocation of init method failed; nested exception is com.blizzard.asterion.client.exception.AsterionException: javax.xml.ws.soap.SOAPFaultException: Could not get JDBC Connection; nested exception is org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot get a connection, pool error Timeout waiting for idle object
type Exception report
message Request processing failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'scopedTarget.marketplace-protectedRequestContext': Invocation of init method failed; nested exception is com.blizzard.asterion.client.exception.AsterionException: javax.xml.ws.soap.SOAPFaultException: Could not get JDBC Connection; nested exception is org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot get a connection, pool error
public class FilterHistoricData {
public static final String SYMBOL1 = "XFU4";
public static final String SYMBOL2 = "XFH4";
public static final String SYMBOL3 = "XFK4";
/** ddf time stamp encoding/decoding mask */
final static int DDF_TIME_STAMP_MASK = 0x40;
final static byte DDF_CENTURY = 0x14;
public static final ValueFactory vals = new ValueFactoryImpl();
@Test
public void testPriceText() {
Price p1 = vals.newPrice(-5, -1);
Price p2 = vals.newPrice(-5, 0);
Price p3 = vals.newPrice(5, -1);
Price p4 = vals.newPrice(5, 0);
Fraction f = vals.newFraction(10, -1);
Observable<Map.Entry<Date, TradingAccountModel>> accountHistory(Account account, Date start);
public interface TradingAccountManager {
Account createAccount(String actName, Price startingCashBalance);
void closeAccount(Account account);
}
java.lang.NullPointerException
at com.barchart.plugin.trader.core.tab.ui.TradeTabView.reloadAccounts(TradeTabView.java:2465)
at com.barchart.plugin.trader.core.tab.ui.TradeTabView.access$1300(TradeTabView.java:130)
at com.barchart.plugin.trader.core.tab.ui.TradeTabView$66.run(TradeTabView.java:3869)
at org.apache.pivot.wtk.ApplicationContext$QueuedCallback.run(ApplicationContext.java:1705)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:251)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:733)
at java.awt.EventQueue.access$200(EventQueue.java:103)
at java.awt.EventQueue$3.run(EventQueue.java:694)
at java.awt.EventQueue$3.run(EventQueue.java:692)