当前位置: 首页>>代码示例>>Java>>正文


Java XmppModulesManager类代码示例

本文整理汇总了Java中tigase.jaxmpp.core.client.XmppModulesManager的典型用法代码示例。如果您正苦于以下问题:Java XmppModulesManager类的具体用法?Java XmppModulesManager怎么用?Java XmppModulesManager使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


XmppModulesManager类属于tigase.jaxmpp.core.client包,在下文中一共展示了XmppModulesManager类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createSessionLogic

import tigase.jaxmpp.core.client.XmppModulesManager; //导入依赖的package包/类
@Override
public XmppSessionLogic createSessionLogic(XmppModulesManager modulesManager, PacketWriter writer) {
	if (context.getSessionObject().getProperty(InBandRegistrationModule.IN_BAND_REGISTRATION_MODE_KEY) == Boolean.TRUE) {
		log.info("Using XEP-0077 mode!!!!");
		return new SocketInBandRegistrationXmppSessionLogic(this, modulesManager, context);
	} else
		return new SocketXmppSessionLogic(this, modulesManager, context);
}
 
开发者ID:horsefaced,项目名称:jaxmpp-android,代码行数:9,代码来源:SocketConnector.java

示例2: SocketInBandRegistrationXmppSessionLogic

import tigase.jaxmpp.core.client.XmppModulesManager; //导入依赖的package包/类
public SocketInBandRegistrationXmppSessionLogic(SocketConnector connector, XmppModulesManager modulesManager,
		Context context) {
	this.connector = connector;
	this.modulesManager = modulesManager;
	this.context = context;

	this.streamFeaturesEventHandler = new StreamFeaturesReceivedHandler() {

		@Override
		public void onStreamFeaturesReceived(SessionObject sessionObject, Element featuresElement) throws JaxmppException {
			SocketInBandRegistrationXmppSessionLogic.this.processStreamFeatures(sessionObject, featuresElement);
		}
	};

	this.receivedErrorHandler = new ReceivedErrorHandler() {

		@Override
		public void onReceivedError(SessionObject sessionObject, IQ responseStanza, ErrorCondition errorCondition)
				throws JaxmppException {
			SocketInBandRegistrationXmppSessionLogic.this.connector.stop();
		}
	};
	this.receivedTimeoutHandler = new ReceivedTimeoutHandler() {

		@Override
		public void onReceivedTimeout(SessionObject sessionObject) throws JaxmppException {
			SocketInBandRegistrationXmppSessionLogic.this.connector.stop();
		}
	};
	this.notSupportedErrorHandler = new NotSupportedErrorHandler() {

		@Override
		public void onNotSupportedError(SessionObject sessionObject) throws JaxmppException {
			SocketInBandRegistrationXmppSessionLogic.this.connector.stop();
		}
	};

}
 
开发者ID:horsefaced,项目名称:jaxmpp-android,代码行数:39,代码来源:SocketInBandRegistrationXmppSessionLogic.java

示例3: createSessionLogic

import tigase.jaxmpp.core.client.XmppModulesManager; //导入依赖的package包/类
@Override
public XmppSessionLogic createSessionLogic(XmppModulesManager modulesManager, PacketWriter writer) {
	if (sessionObject.getProperty(InBandRegistrationModule.IN_BAND_REGISTRATION_MODE_KEY) == Boolean.TRUE) {
		log.info("Using XEP-0077 mode!!!!");
		return new SocketInBandRegistrationXmppSessionLogic(this, modulesManager, sessionObject, writer);
	} else
		return new SocketXmppSessionLogic(this, modulesManager, sessionObject, writer);
}
 
开发者ID:liule,项目名称:tigase-jaxmpp2,代码行数:9,代码来源:SocketConnector.java

示例4: SocketInBandRegistrationXmppSessionLogic

import tigase.jaxmpp.core.client.XmppModulesManager; //导入依赖的package包/类
public SocketInBandRegistrationXmppSessionLogic(SocketConnector connector, XmppModulesManager modulesManager,
		SessionObject sessionObject, PacketWriter writer) {
	this.connector = connector;
	this.modulesManager = modulesManager;
	this.sessionObject = sessionObject;

	this.streamFeaturesEventListener = new Listener<StreamFeaturesModule.StreamFeaturesReceivedEvent>() {

		@Override
		public void handleEvent(StreamFeaturesReceivedEvent be) throws JaxmppException {
			try {
				processStreamFeatures(be);
			} catch (JaxmppException e) {
				processException(e);
			}
		}
	};
	registrationListener = new Listener<BaseEvent>() {

		@Override
		public void handleEvent(BaseEvent be) throws JaxmppException {
			if (be.getType() == InBandRegistrationModule.ReceivedError) {
				SocketInBandRegistrationXmppSessionLogic.this.connector.stop();
			} else if (be.getType() == InBandRegistrationModule.ReceivedTimeout) {
				SocketInBandRegistrationXmppSessionLogic.this.connector.stop();
			} else if (be.getType() == InBandRegistrationModule.NotSupportedError) {
				SocketInBandRegistrationXmppSessionLogic.this.connector.stop();
			}
		}
	};
}
 
开发者ID:liule,项目名称:tigase-jaxmpp2,代码行数:32,代码来源:SocketInBandRegistrationXmppSessionLogic.java

示例5: PubSubModuleTest

import tigase.jaxmpp.core.client.XmppModulesManager; //导入依赖的package包/类
public PubSubModuleTest() {
	this.writer = new MockWriter(sessionObject);

	DefaultObservable observable = new DefaultObservable();
	XmppModulesManager xmppModulesManages = new XmppModulesManager(observable, writer);
	xmppModulesManages.register(new PingModule(sessionObject, writer));
	this.pubsub = new PubSubModule(null, sessionObject, this.writer);
}
 
开发者ID:liule,项目名称:tigase-jaxmpp2,代码行数:9,代码来源:PubSubModuleTest.java

示例6: SocketXmppSessionLogic

import tigase.jaxmpp.core.client.XmppModulesManager; //导入依赖的package包/类
public SocketXmppSessionLogic(SocketConnector connector, XmppModulesManager modulesManager, Context context) {
	super(connector, modulesManager, context);
}
 
开发者ID:horsefaced,项目名称:jaxmpp-android,代码行数:4,代码来源:SocketXmppSessionLogic.java

示例7: AbstractSocketXmppSessionLogic

import tigase.jaxmpp.core.client.XmppModulesManager; //导入依赖的package包/类
protected AbstractSocketXmppSessionLogic(T connector, XmppModulesManager modulesManager, Context context) {
	this.connector = connector;
	this.modulesManager = modulesManager;
	this.context = context;

	this.connectorListener = new Connector.ErrorHandler() {

		@Override
		public void onError(SessionObject sessionObject, StreamError condition, Throwable caught) throws JaxmppException {
			AbstractSocketXmppSessionLogic.this.processConnectorErrors(condition, caught);
		}
	};

	this.streamFeaturesEventListener = new StreamFeaturesReceivedHandler() {

		@Override
		public void onStreamFeaturesReceived(SessionObject sessionObject, Element featuresElement) throws JaxmppException {
			AbstractSocketXmppSessionLogic.this.processStreamFeatures(featuresElement);
		}
	};

	this.authFailedHandler = new AuthFailedHandler() {

		@Override
		public void onAuthFailed(SessionObject sessionObject, SaslError error) throws JaxmppException {
			AbstractSocketXmppSessionLogic.this.processAuthFailed(error);
		}
	};
	this.authSuccessHandler = new AuthSuccessHandler() {

		@Override
		public void onAuthSuccess(SessionObject sessionObject) throws JaxmppException {
			AbstractSocketXmppSessionLogic.this.processAuthSuccess();
		}
	};
	this.resourceBindListener = new ResourceBindSuccessHandler() {

		@Override
		public void onResourceBindSuccess(SessionObject sessionObject, JID bindedJid) throws JaxmppException {
			AbstractSocketXmppSessionLogic.this.processResourceBindEvent(sessionObject, bindedJid);
		}
	};

	this.sessionEstablishmentErrorHandler = new SessionEstablishmentModule.SessionEstablishmentErrorHandler() {

		@Override
		public void onSessionEstablishmentError(SessionObject sessionObject, ErrorCondition error) throws JaxmppException {
			// FIXME
			sessionBindedAndEstablished(sessionObject);
		}
	};
	this.sessionEstablishmentSuccessHandler = new SessionEstablishmentModule.SessionEstablishmentSuccessHandler() {

		@Override
		public void onSessionEstablishmentSuccess(SessionObject sessionObject) throws JaxmppException {
			sessionBindedAndEstablished(sessionObject);
		}
	};

	this.smResumedListener = new StreamManagementModule.StreamResumedHandler() {

		@Override
		public void onStreamResumed(SessionObject sessionObject, Long h, String previd) throws JaxmppException {
			//sessionObject.clear(Scope.session);
			//resourceBinder.bind();
			AbstractSocketXmppSessionLogic.this.context.getEventBus().fire(new XmppSessionEstablishedHandler.XmppSessionEstablishedEvent(sessionObject));
		}
	};
}
 
开发者ID:horsefaced,项目名称:jaxmpp-android,代码行数:70,代码来源:AbstractSocketXmppSessionLogic.java

示例8: WebSocketXmppSessionLogic

import tigase.jaxmpp.core.client.XmppModulesManager; //导入依赖的package包/类
public WebSocketXmppSessionLogic(AbstractWebSocketConnector connector, XmppModulesManager modulesManager, Context context) {
	super(connector, modulesManager, context);
}
 
开发者ID:horsefaced,项目名称:jaxmpp-android,代码行数:4,代码来源:WebSocketXmppSessionLogic.java

示例9: createSessionLogic

import tigase.jaxmpp.core.client.XmppModulesManager; //导入依赖的package包/类
@Override
public XmppSessionLogic createSessionLogic(XmppModulesManager modulesManager, PacketWriter writer) {
	return new BoshXmppSessionLogic(context, this, modulesManager);
}
 
开发者ID:horsefaced,项目名称:jaxmpp-android,代码行数:5,代码来源:AbstractBoshConnector.java

示例10: createSessionLogic

import tigase.jaxmpp.core.client.XmppModulesManager; //导入依赖的package包/类
@Override
public XmppSessionLogic createSessionLogic(XmppModulesManager modulesManager, PacketWriter writer) {
	return connector.createSessionLogic(modulesManager, writer);
}
 
开发者ID:horsefaced,项目名称:jaxmpp-android,代码行数:5,代码来源:ConnectorWrapper.java

示例11: createSessionLogic

import tigase.jaxmpp.core.client.XmppModulesManager; //导入依赖的package包/类
@Override
public XmppSessionLogic createSessionLogic(XmppModulesManager modulesManager, PacketWriter writer) {
	return new WebSocketXmppSessionLogic(this, modulesManager, context);
}
 
开发者ID:horsefaced,项目名称:jaxmpp-android,代码行数:5,代码来源:AbstractWebSocketConnector.java

示例12: BoshXmppSessionLogic

import tigase.jaxmpp.core.client.XmppModulesManager; //导入依赖的package包/类
public BoshXmppSessionLogic(Context context, Connector connector, XmppModulesManager modulesManager) {
	this.context = context;
	this.connector = connector;
	this.modulesManager = modulesManager;

	this.streamFeaturesReceivedHandler = new StreamFeaturesReceivedHandler() {

		@Override
		public void onStreamFeaturesReceived(SessionObject sessionObject, Element featuresElement) {
			try {
				BoshXmppSessionLogic.this.onStreamFeaturesReceived(sessionObject, featuresElement);
			} catch (JaxmppException e) {
				processException(e);
			}
		}
	};

	this.authSuccessHandler = new AuthSuccessHandler() {

		@Override
		public void onAuthSuccess(SessionObject sessionObject) {
			try {
				processAuthSucess(sessionObject);
			} catch (JaxmppException e) {
				processException(e);
			}
		}
	};
	this.authFailedHandler = new AuthFailedHandler() {

		@Override
		public void onAuthFailed(SessionObject sessionObject, SaslError error) {
			try {
				processAuthFail(sessionObject, error);
			} catch (JaxmppException e) {
				processException(e);
			}
		}
	};

	this.resourceBindErrorHandler = new ResourceBindErrorHandler() {

		@Override
		public void onResourceBindError(SessionObject sessionObject, ErrorCondition errorCondition) {
			BoshXmppSessionLogic.this.onResourceBindError(sessionObject, sessionObject);
		}
	};
	this.resourceBindSuccessHandler = new ResourceBindSuccessHandler() {

		@Override
		public void onResourceBindSuccess(SessionObject sessionObject, JID bindedJid) {
			try {
				BoshXmppSessionLogic.this.onResourceBindSuccess(sessionObject, bindedJid);
			} catch (JaxmppException e) {
				processException(e);
			}
		}
	};
}
 
开发者ID:horsefaced,项目名称:jaxmpp-android,代码行数:60,代码来源:BoshXmppSessionLogic.java

示例13: getModuleManager

import tigase.jaxmpp.core.client.XmppModulesManager; //导入依赖的package包/类
@Override
public XmppModulesManager getModuleManager() {
    return this.jaxmpp.getModulesManager();
}
 
开发者ID:openfin,项目名称:openchat-java-client,代码行数:5,代码来源:XMPPClientImpl.java

示例14: SocketXmppSessionLogic

import tigase.jaxmpp.core.client.XmppModulesManager; //导入依赖的package包/类
public SocketXmppSessionLogic(SocketConnector connector, XmppModulesManager modulesManager, SessionObject sessionObject,
		PacketWriter writer) {
	this.connector = connector;
	this.modulesManager = modulesManager;
	this.sessionObject = sessionObject;

	this.connectorListener = new Listener<Connector.ConnectorEvent>() {

		@Override
		public void handleEvent(Connector.ConnectorEvent be) throws JaxmppException {
			processConnectorEvents(be);
		}
	};

	this.streamFeaturesEventListener = new Listener<StreamFeaturesModule.StreamFeaturesReceivedEvent>() {

		@Override
		public void handleEvent(StreamFeaturesReceivedEvent be) throws JaxmppException {
			try {
				processStreamFeatures(be);
			} catch (JaxmppException e) {
				processException(e);
			}
		}
	};
	this.saslEventListener = new Listener<AuthModule.AuthEvent>() {

		@Override
		public void handleEvent(AuthModule.AuthEvent be) throws JaxmppException {
			try {
				if (be instanceof SaslEvent) {
					processSaslEvent((SaslEvent) be);
				} else if (be instanceof NonSaslAuthEvent) {
					processNonSaslEvent((NonSaslAuthEvent) be);
				}
			} catch (JaxmppException e) {
				processException(e);
			}
		}

	};
	this.resourceBindListener = new Listener<ResourceBindEvent>() {

		@Override
		public void handleEvent(ResourceBindEvent be) throws JaxmppException {
			try {
				processResourceBindEvent(be);
			} catch (JaxmppException e) {
				processException(e);
			}

		}
	};
	this.sessionEstablishmentListener = new Listener<SessionEstablishmentModule.SessionEstablishmentEvent>() {

		@Override
		public void handleEvent(SessionEstablishmentEvent be) throws JaxmppException {
			sessionBindedAndEstablished();
		}
	};
}
 
开发者ID:liule,项目名称:tigase-jaxmpp2,代码行数:62,代码来源:SocketXmppSessionLogic.java

示例15: createSessionLogic

import tigase.jaxmpp.core.client.XmppModulesManager; //导入依赖的package包/类
@Override
public XmppSessionLogic createSessionLogic(XmppModulesManager modulesManager, PacketWriter writer) {
        return new BoshXmppSessionLogic(this, modulesManager, sessionObject, writer);
}
 
开发者ID:liule,项目名称:tigase-jaxmpp2,代码行数:5,代码来源:WebSocketConnector.java


注:本文中的tigase.jaxmpp.core.client.XmppModulesManager类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。