forums Albums groups
Go Back   Betfair Developers Program Forum > Blogs > Java and the Betfair API
Open A Betfair Account
 Blogs FAQ Members List Calendar Search Today's Posts Mark Forums Read

Since I mainly access the API using Java, thats what I'll be blogging about. I am most definitely not an expert java programmer, but I am getting very good at reading the Javadoc.

If I post something which is incorrect or something which could be made more efficient somehow, post a comment. I really don't have a problem with criticism of any kind. Even cruel criticism has something to be learned from and since you get a finite number of days allocated to you, any day you don't learn something is one of those days wasted.
Multithreading/Concurrency For blogs which touch on Concurrency and multithreading.
Old

Timers and the like

Posted 05-05-2009 at 03:21 PM by ThanksFish
Now, this may not be useful to all of you, except as an exercise in problem solving, but I've been having a problem sorting out the timings of my GetMarketPrices calls.

The way I'm working things is I use a ThreadPool implementation I was given by an extremely generous soul and I pass GetMarketPrices calls into it. Since I'm generally looping over a set number of markets and my computer runs a lot faster than the internet, its very easy for the threadpool to become overrun by requests,...
Member
Comments 0 ThanksFish is offline
Old

Logging out - it's the polite thing to do.

Posted 04-05-2009 at 03:31 PM by ThanksFish
Ok, what I'm doing here is a Logout class, so we can at the very least have a polite bot which logs in and logs out when we have finished.

So, using the project we have been working on, we will need to set up a few new classes. I'll say this again - the way I'm showing you may well not be the best way to do stuff, but it is a way which works.

What I'm going to do here first is set up two new classes which will provide us with APIRequestHeader objects when we need them....
Member
Comments 13 ThanksFish is offline
Old

Concurrently adding and removing components

Posted 03-07-2009 at 04:14 PM by ThanksFish
Updated 03-07-2009 at 04:16 PM by ThanksFish
I've just managed to do something I'm fairly proud of. Its probably fairly small beans to a lot of folk, but it took me ages to figure out and I'm fairly chuffed with myself.

I'm writing a bot (aren't we all!) and I've taken a bit of a leap into the unknown with some of the techniques I'm using. For example, I've created some custom components to show my data. Not all that groundbreaking really, but since the aim of my bot is for me to start it up and walk away from it, but still...
Member
Comments 0 ThanksFish is offline

All times are GMT. The time now is 02:58 PM.

BETFAIR® and the BETFAIR LOGO are registered trade marks of The Sporting Exchange Limited. Data on Betfair website(s) (including pricing data) is protected by © and database rights. It may not be used for any purpose without a licence. © The Sporting Exchange Limited. All rights reserved.