diff src/alice/daemon/IncomingTcpConnection.java @ 224:409d7679cf7b

merge
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Thu, 28 Mar 2013 00:21:38 +0900 (2013-03-27)
parents 4bfd81352cfa 87f1a30a8c82
children d9c9076d6b47
line wrap: on
line diff
--- a/src/alice/daemon/IncomingTcpConnection.java	Tue Feb 21 23:13:56 2012 +0900
+++ b/src/alice/daemon/IncomingTcpConnection.java	Thu Mar 28 00:21:38 2013 +0900
@@ -4,9 +4,9 @@
 import java.io.IOException;
 import java.nio.channels.ClosedChannelException;
 
-import org.msgpack.MessagePack;
 import org.msgpack.unpacker.Unpacker;
 
+import alice.codesegment.SingletonMessage;
 import alice.datasegment.Command;
 import alice.datasegment.CommandType;
 import alice.datasegment.DataSegment;
@@ -16,11 +16,10 @@
 
 public class IncomingTcpConnection extends Thread {
 	
-	private static MessagePack MSGPACK = new MessagePack();
 	public Connection connection;
 	public DataSegmentManager manager;
 	public String reverseKey;
-	private LocalDataSegmentManager lmanager = DataSegment.getLocal();;
+	private LocalDataSegmentManager lmanager = DataSegment.getLocal();
 
 	public IncomingTcpConnection(Connection connection, DataSegmentManager manager, String reverseKey) {
 		this.manager = manager;
@@ -34,7 +33,7 @@
 	public void run() {
 		Unpacker unpacker = null;
 		try {
-			unpacker = MSGPACK.createUnpacker(connection.socket.getInputStream());
+			unpacker = SingletonMessage.getInstance().createUnpacker(connection.socket.getInputStream());
 		} catch (IOException e2) {
 			e2.printStackTrace();
 		}