package com.cloudhopper.smpp.demo.persist;

/*
 * #%L
 * ch-smpp
 * %%
 * Copyright (C) 2009 - 2014 Cloudhopper by Twitter
 * %%
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 *      http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * #L%
 */

import com.cloudhopper.smpp.SmppSession;
import com.cloudhopper.smpp.SmppSessionConfiguration;

public abstract class Client {

	protected volatile SmppSession smppSession;

	public SmppSessionConfiguration getConfiguration() {
		return smppSession.getConfiguration();
	}

	public boolean isConnected() {
		if (smppSession != null) {
			return smppSession.isBound();
		}
		return false;
	}

	public SmppSession getSession() {
		return smppSession;
	}
}

@@ -1003,17 +1003,50 @@
 %7B%0A%09%09
+SmppSession session = smppSession;%0A%09%09
 if (s
-mppS
 essi
@@ -1066,28 +1066,24 @@
 %0A%09%09%09return s
-mppS
 ession.isBou

possible NPE