// Path: src/net/gecosi/internal/CommWriter.java
// public interface CommWriter {
// 
// 	public void write(SiMessage message) throws IOException;
// 
// }
// 
// Path: src/net/gecosi/internal/SiMessageQueue.java
// public class SiMessageQueue extends ArrayBlockingQueue<SiMessage> {
// 
// 	private long defaultTimeout;
// 
// 	public SiMessageQueue(int capacity) {
// 		this(capacity, 2000);
// 	}
// 
// 	public SiMessageQueue(int capacity, long defaultTimeout) {
// 		super(capacity);
// 		this.defaultTimeout = defaultTimeout;
// 	}
// 
// 	public SiMessage timeoutPoll() throws InterruptedException, TimeoutException {
// 		SiMessage message = poll(defaultTimeout, TimeUnit.MILLISECONDS);
// 		if( message != null ){
// 			return message;
// 		} else {
// 			throw new TimeoutException();
// 		}
// 	}
// 	
// }
// 
// Path: src/net/gecosi/internal/SiPort.java
// public interface SiPort {
// 
// 	public SiMessageQueue createMessageQueue() throws TooManyListenersException, IOException;
// 
// 	public CommWriter createWriter() throws IOException;
// 
// 	public void setupHighSpeed() throws UnsupportedCommOperationException;
// 	
// 	public void setupLowSpeed() throws UnsupportedCommOperationException;
// 
// 	public void close();
// 
// }


import gnu.io.UnsupportedCommOperationException;
import java.io.IOException;
import java.util.TooManyListenersException;
import net.gecosi.internal.CommWriter;
import net.gecosi.internal.SiMessageQueue;
import net.gecosi.internal.SiPort;
/**
 * Copyright (c) 2013 Simon Denier
 */
package net.gecosi.adapter.logfile;




/**
 * @author Simon Denier
 * @since Apr 28, 2013
 *
 */
public class LogFilePort implements SiPort {

	private String logFilename;

	public LogFilePort(String logFilename) {
		this.logFilename = logFilename;
	}

	@Override
// Path: src/net/gecosi/internal/CommWriter.java
// public interface CommWriter {
// 
// 	public void write(SiMessage message) throws IOException;
// 
// }
// 
// Path: src/net/gecosi/internal/SiMessageQueue.java
// public class SiMessageQueue extends ArrayBlockingQueue<SiMessage> {
// 
// 	private long defaultTimeout;
// 
// 	public SiMessageQueue(int capacity) {
// 		this(capacity, 2000);
// 	}
// 
// 	public SiMessageQueue(int capacity, long defaultTimeout) {
// 		super(capacity);
// 		this.defaultTimeout = defaultTimeout;
// 	}
// 
// 	public SiMessage timeoutPoll() throws InterruptedException, TimeoutException {
// 		SiMessage message = poll(defaultTimeout, TimeUnit.MILLISECONDS);
// 		if( message != null ){
// 			return message;
// 		} else {
// 			throw new TimeoutException();
// 		}
// 	}
// 	
// }
// 
// Path: src/net/gecosi/internal/SiPort.java
// public interface SiPort {
// 
// 	public SiMessageQueue createMessageQueue() throws TooManyListenersException, IOException;
// 
// 	public CommWriter createWriter() throws IOException;
// 
// 	public void setupHighSpeed() throws UnsupportedCommOperationException;
// 	
// 	public void setupLowSpeed() throws UnsupportedCommOperationException;
// 
// 	public void close();
// 
// }


// Path: src/net/gecosi/adapter/logfile/LogFilePort.java
import gnu.io.UnsupportedCommOperationException;
import java.io.IOException;
import java.util.TooManyListenersException;
import net.gecosi.internal.CommWriter;
import net.gecosi.internal.SiMessageQueue;
import net.gecosi.internal.SiPort;

/**
 * Copyright (c) 2013 Simon Denier
 */
package net.gecosi.adapter.logfile;




/**
 * @author Simon Denier
 * @since Apr 28, 2013
 *
 */
public class LogFilePort implements SiPort {

	private String logFilename;

	public LogFilePort(String logFilename) {
		this.logFilename = logFilename;
	}

	@Override
	public SiMessageQueue createMessageQueue() throws TooManyListenersException, IOException {