package pro.simpleproject.core.intra.model;

import pro.simpleproject.core.intra.client.Client;

public class IntraContact {

	private String address;
	private int port;
	private Client client;

	public IntraContact(String address, int port) {
		this.address = address;
		this.port = port;
	}

	public IntraContact(String address) {
		this(address, 0);
	}

	public String getAddress() {
		return address;
	}

	public void setPort(int port) {
		this.port = port;
	}

	public int getPort() {
		return port;
	}

	public Client getClient() {
		if (client == null) {
			if (port == 0) {
				return null;
			}
			client = new Client(address, port);
		}
		return client;
	}

	public void close() {
		if (client != null) {
			client.close();
		}
	}

}

@@ -42,60 +42,8 @@
 l;%0A%0A
-import pro.simpleproject.core.intra.client.Client;%0A%0A
 publ
@@ -114,32 +114,8 @@
 ort;
-%0A%09private Client client;
 %0A%0A%09p
@@ -215,71 +215,8 @@
 %09%7D%0A%0A
-%09public IntraContact(String address) %7B%0A%09%09this(address, 0);%0A%09%7D%0A%0A
 %09pub
@@ -375,228 +375,76 @@
 lic 
-Client getClient() %7B%0A%09%09if (client == null) %7B%0A%09%09%09if (port == 0
+boolean write(Object o
 ) %7B%0A%09%09
-%09
-%09
 return 
-null;%0A%09%09%09%7D%0A%09%09%09client = new Client(address, port);%0A%09%09%7D%0A%09%09return client;%0A%09%7D%0A%0A%09public void close() %7B%0A%09%09if (client != null) %7B%0A%09%09%09client.close();%0A%09%09%7D
+false;%0A%09%7D%0A%0A%09public void close() %7B
 %0A%09%7D%0A

Update IntraContact.java