TCPIPConnection connection = new TCPIPConnection (myHost, myPort);
connection.setReceiveTimeout (cReceiveTimeout);
mySession = new Session (connection);
// configure the bind request
BindRequest request = null;
if (access.equals (SmppAccessType.eTransmitter)) {
request = new BindTransmitter ();
}
else if (access.equals (SmppAccessType.eReceiver)) {
request = new BindReceiver ();
}
else if (access.equals (SmppAccessType.eTransciever)) {
request = new BindTransciever ();
}
else {
myLog.error ("open :access type {} not recognissed.", access);
return false;
}
try {
request.setSystemId (myUsername);
request.setPassword (myPassword);
request.setSystemType (system.getCode ());
}
catch (WrongLengthOfStringException exc) {
myLog.error ("open: failed setting parameters for request", exc);
return false;
}
request.setInterfaceVersion ((byte)0x34);
request.setAddressRange (addressRange);
myLog.debug("open: bind pdu: {}", request.debugString ());
return bind (request, listener);
}