All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.mobius.software.telco.protocols.diameter.DiameterStack Maven / Gradle / Ivy

package com.mobius.software.telco.protocols.diameter;
/*
 * Mobius Software LTD, Open Source Cloud Communications
 * Copyright 2023, Mobius Software LTD and individual contributors
 * by the @authors tag.
 *
 * This program is free software: you can redistribute it and/or modify
 * under the terms of the GNU Affero General Public License as
 * published by the Free Software Foundation; either version 3 of
 * the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this program.  If not, see 
 */

import java.util.Map;

import org.restcomm.cluster.ClusteredID;
import org.restcomm.cluster.IDGenerator;

import com.mobius.software.common.dal.timers.CountableQueue;
import com.mobius.software.common.dal.timers.PeriodicQueuedTasks;
import com.mobius.software.common.dal.timers.Task;
import com.mobius.software.common.dal.timers.Timer;
import com.mobius.software.telco.protocols.diameter.commands.DiameterAnswer;
import com.mobius.software.telco.protocols.diameter.commands.DiameterMessage;
import com.mobius.software.telco.protocols.diameter.commands.DiameterRequest;
import com.mobius.software.telco.protocols.diameter.exceptions.DiameterException;
import com.mobius.software.telco.protocols.diameter.parser.DiameterParser;

/**
*
* @author yulian oifa
*
*/
public interface DiameterStack
{
	ClassLoader getClassLoader();
	
	DiameterProvider getProvider(Class providerClass);
		
	//package is required for credit control and others that has multiple options
	DiameterProvider getProvider(Long applicationID,Package parentPackage);
	
	void registerCustomProvider(DiameterProvider provider,Package parentPackage);
	
	CountableQueue getQueue();
	
	PeriodicQueuedTasks getPeriodicQueue();
	
	IDGenerator getIDGenerator();
	
	ClusteredID generateID();
	
	Long getResponseTimeout();
	
	Long getIdleTimeout();
	
	void setIdleTimeout(Long value);
	
	Long getDuplicatesTimeout();
	
	Long getDuplicatesCheckPeriod();
	
	String generateNewSessionID();
	
	void sendRequest(DiameterRequest message,AsyncCallback callback);
	
	void sendAnswer(DiameterAnswer message,String destinationHost,String destinationRealm,AsyncCallback callback);
	
	NetworkManager getNetworkManager();
	
	Long getOriginalStateId();
	
	Long getNextHopByHopIdentifier();
	
	String getProductName();
	
	Long  getVendorID();
	
	Long getFirmwareRevision();
	
	void stop();
	
	DiameterSessionStorage getSessionStorage();
	
	IncomingRequestsStorage getRequestsStorage();
	
	Map getMessagesSentByType();
    
    Map getMessagesReceivedByType();
    
    Map getErrorsSentByType();
    
    Map getErrorsReceivedByType();
    
    Map getOutgoingSessionByApplication();
    
    Map getIncomingSessionsByApplication();  
    
    Map getSessionEndedByResultCode();
    
    Map getSessionEndedByResultCodeAndApplication(ApplicationID applicationID);
    
    Map getMessagesSentByTypeAndApplication(ApplicationID applicationID);
    
    Map getMessagesReceivedByTypeAndApplication(ApplicationID applicationID);
    
    Map getErrorsSentByTypeAndApplication(ApplicationID applicationID);
    
    Map getErrorsReceivedByTypeAndApplication(ApplicationID applicationID);
    
    Map getLinkMessagesSentByTypeAndApplication(String linkID, ApplicationID applicationID);
    
    Map getLinkMessagesReceivedByTypeAndApplication(String linkID, ApplicationID applicationID);
    
    Map getLinkErrorsSentByTypeAndApplication(String linkID, ApplicationID applicationID);
    
    Map getLinkErrorsReceivedByTypeAndApplication(String linkID, ApplicationID applicationID);
    
    Map> getLinkMessagesSentByTypeAndApplication(String linkID);
    
    Map> getLinkMessagesReceivedByTypeAndApplication(String linkID);
    
    Map> getLinkErrorsSentByTypeAndApplication(String linkID);
    
    Map> getLinkErrorsReceivedByTypeAndApplication(String linkID);
    
    void messageReceived(DiameterMessage message, String linkID);
    
    void messageSent(DiameterMessage message, String linkID);
    
    void newIncomingSession(ApplicationID applicationID);
    
    void newOutgoingSession(ApplicationID applicationID);
    
    void sessionEnded(Long resultCode, ApplicationID applicationID);
    
    void registerGlobalApplication(Package providerPackageName, Package packageName) throws DiameterException;
    
    DiameterParser getGlobalParser();
    
    Boolean isSessionLess();
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy