@Override public Association addSctpAssociation(String hostAddress, int hostPort, String peerAddress, int peerPort, String assocName, String ipChannelType, String extraHostAddresses) throws Exception { this.wrappedSctpManagement.addAssociation(hostAddress, hostPort, peerAddress, peerPort, assocName, IpChannelType.valueOf(ipChannelType.toUpperCase()), (extraHostAddresses != null && !extraHostAddresses.isEmpty()) ? extraHostAddresses.split(",") : null); return null; }
@Override public Association addSctpServerAssociation(String peerAddress, int peerPort, String serverName, String assocName, String ipChannelType) throws Exception { this.wrappedSctpManagement.addServerAssociation(peerAddress, peerPort, serverName, assocName, IpChannelType.valueOf(ipChannelType.toUpperCase())); return null; }
@Override public Server addSctpServer(String serverName, String hostAddress, int port, String ipChannelType, boolean acceptAnonymousConnections, int maxConcurrentConnectionsCount, String extraHostAddresses) throws Exception { this.wrappedSctpManagement.addServer(serverName, hostAddress, port, IpChannelType.valueOf(ipChannelType.toUpperCase()), acceptAnonymousConnections, maxConcurrentConnectionsCount, (extraHostAddresses != null && !extraHostAddresses.isEmpty()) ? extraHostAddresses.split(",") : null); return null; }
@Override public Association modifySctpServerAssociation(String peerAddress, String peerPort, String serverName, String assocName, String ipChannelType) throws Exception { String currPeerAddress = null; if(peerAddress!=null && !peerAddress.isEmpty()) currPeerAddress = peerAddress; Integer currPeerPort = null; if(peerPort!=null && !peerPort.isEmpty()) currPeerPort = Integer.valueOf(peerPort); String currServerName = null; if(serverName!=null && !serverName.isEmpty()) currServerName = serverName; IpChannelType currIpChannelType = null; if(ipChannelType!=null && !ipChannelType.isEmpty()) currIpChannelType = IpChannelType.valueOf(ipChannelType.toUpperCase()); this.wrappedSctpManagement.modifyServerAssociation(assocName, currPeerAddress, currPeerPort, currServerName, currIpChannelType); return null; }
@Override public Association modifySctpAssociation(String hostAddress, String hostPort, String peerAddress, String peerPort, String assocName, String ipChannelType, String extraHostAddresses) throws Exception { String currHostAddress = null; if(hostAddress!=null && !hostAddress.isEmpty()) currHostAddress = hostAddress; Integer currHostPort = null; if(hostPort!=null && !hostPort.isEmpty()) currHostPort = Integer.valueOf(hostPort); String currPeerAddress = null; if(peerAddress!=null && !peerAddress.isEmpty()) currPeerAddress = peerAddress; Integer currPeerPort = null; if(peerPort!=null && !peerPort.isEmpty()) currPeerPort = Integer.valueOf(peerPort); IpChannelType currIpChannelType = null; if(ipChannelType!=null && !ipChannelType.isEmpty()) currIpChannelType = IpChannelType.valueOf(ipChannelType.toUpperCase()); String[] currExtraHostAddresses = null; if(extraHostAddresses != null && !extraHostAddresses.isEmpty()) currExtraHostAddresses = extraHostAddresses.split(","); this.wrappedSctpManagement.modifyAssociation(currHostAddress, currHostPort, currPeerAddress, currPeerPort, assocName, currIpChannelType, currExtraHostAddresses); return null; }
@Override public Server modifySctpServer(String serverName, String hostAddress, String port, String ipChannelType, String acceptAnonymousConnections, String maxConcurrentConnectionsCount, String extraHostAddresses) throws Exception { String currHostAddress = null; if(hostAddress!=null && !hostAddress.isEmpty()) currHostAddress = hostAddress; Integer currPort = null; if(port!=null && !port.isEmpty()) currPort = Integer.valueOf(port); IpChannelType currIpChannelType = null; if(ipChannelType!=null && !ipChannelType.isEmpty()) currIpChannelType = IpChannelType.valueOf(ipChannelType.toUpperCase()); Boolean currAcceptAnonymousConnections = null; if(acceptAnonymousConnections!=null && !acceptAnonymousConnections.isEmpty()) currAcceptAnonymousConnections = Boolean.valueOf(acceptAnonymousConnections); Integer currMaxConcurrentConnectionsCount = null; if(maxConcurrentConnectionsCount!=null && !maxConcurrentConnectionsCount.isEmpty()) currMaxConcurrentConnectionsCount = Integer.valueOf(maxConcurrentConnectionsCount); String[] currExtraHostAddresses = null; if(extraHostAddresses != null && !extraHostAddresses.isEmpty()) currExtraHostAddresses = extraHostAddresses.split(","); this.wrappedSctpManagement.modifyServer(serverName, currHostAddress, currPort, currIpChannelType, currAcceptAnonymousConnections, currMaxConcurrentConnectionsCount, currExtraHostAddresses); return null; }
public void read(InputElement xml, M3uaConfigurationData_OldFormat m3ua) throws XMLStreamException { m3ua.setIsSctpServer(xml.getAttribute(IS_SCTP_SERVER).toBoolean()); m3ua.setLocalPort(xml.getAttribute(LOCAL_PORT).toInt()); m3ua.setRemotePort(xml.getAttribute(REMOTE_PORT).toInt()); String str = xml.getAttribute(IP_CHANNEL_TYPE).toString(); m3ua.setIpChannelType(IpChannelType.valueOf(str)); m3ua.setDpc(xml.getAttribute(DPC).toInt()); m3ua.setOpc(xml.getAttribute(OPC).toInt()); m3ua.setSi(xml.getAttribute(SI).toInt()); m3ua.setRoutingContext(xml.getAttribute(ROUTING_CONTEXT).toInt()); m3ua.setNetworkAppearance(xml.getAttribute(NETWORK_APPEARANCE).toInt()); str = xml.getAttribute(M3UA_FUNCTIONALITY).toString(); m3ua.setM3uaFunctionality(Functionality.valueOf(str)); str = xml.getAttribute(M3UA_EXCHANGE_TYPE).toString(); m3ua.setM3uaExchangeType(ExchangeType.valueOf(str)); str = xml.getAttribute(M3UA_IPSPType).toString(); m3ua.setM3uaIPSPType(IPSPType.valueOf(str)); m3ua.setLocalHost((String) xml.get(LOCAL_HOST, String.class)); m3ua.setRemoteHost((String) xml.get(REMOTE_HOST, String.class)); m3ua.setSctpExtraHostAddresses((String) xml.get(EXTRA_HOST_ADDRESSES, String.class)); } };
m3ua.ipChannelType = IpChannelType.valueOf(str);