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

nadron.beans.server-protocols.xml Maven / Gradle / Ivy

Go to download

Nadron is a high speed socket based java game server written using Netty and Mike Rettig's Jetlang. It is specifically tuned for network based multiplayer games and supports TCP and UDP network protocols.

The newest version!
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context"
	xmlns:util="http://www.springframework.org/schema/util"
	xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.2.xsd
		http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.2.xsd 
		http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-3.2.xsd">

	<import resource="netty-handlers.xml" />
	
	<context:annotation-config />
	
	<bean id="amf3Protocol"  class="io.nadron.protocols.impl.AMF3Protocol">
		<property name="lengthFieldPrepender" ref="lengthFieldPrepender" />
		<property name="javaObjectToAMF3Encoder" ref="javaToAMF3Encoder" />
	</bean>
	
	<bean id="amf3StringProtocol" class="io.nadron.protocols.impl.AMF3StringProtocol">
		<property name="maxFrameSize" value="4096" />
		<property name="nulEncoder" ref="nulEncoder" />
		<property name="base64Decoder" ref="base64Decoder" />
		<property name="base64Encoder" ref="base64Encoder" />
		<property name="javaObjectToAMF3Encoder" ref="javaToAMF3Encoder" />
	</bean>
	
	<bean id="stringProtocol" class="io.nadron.protocols.impl.StringProtocol">
		<property name="frameSize" value="4096" />
		<property name="nulEncoder" ref="nulEncoder" />
		<property name="stringDecoder" ref="stringDecoder" />
		<property name="stringEncoder" ref="stringMessageEncoder" />
	</bean>
	
	<bean id="channelBufferProtocol" class="io.nadron.protocols.impl.ChannelBufferProtocol">
		<property name="eventDecoder" ref="eventDecoder" />
		<property name="lengthFieldPrepender" ref="lengthFieldPrepender" />
		<property name="eventEncoder" ref="eventEncoder" />
	</bean>
	
	<bean id="messageBufferProtocol" class="io.nadron.protocols.impl.MessageBufferProtocol">
		<property name="lengthFieldPrepender" ref="lengthFieldPrepender" />
		<property name="messageBufferEventDecoder" ref="messageBufferEventDecoder" />
		<property name="messageBufferEventEncoder" ref="messageBufferEventEncoder" />
	</bean>

	<bean id="webSocketProtocol" class="io.nadron.protocols.impl.WebSocketProtocol">
		<property name="textWebsocketDecoder" ref="textWebsocketDecoder" />
		<property name="textWebsocketEncoder" ref="textWebsocketEncoder" />
	</bean>
	
	<bean id="nettyObjectProtocol" class="io.nadron.protocols.impl.NettyObjectProtocol">
		<property name="lengthFieldPrepender" ref="lengthFieldPrepender" />
	</bean>
	
	<bean id="msgPackProtocol" class="io.nadron.protocols.impl.MsgPackProtocol">
		<property name="lengthFieldPrepender" ref="lengthFieldPrepender" />
		<property name="msgPackDecoder" ref="msgPackDecoder" />
		<property name="msgPackEncoder" ref="msgPackEncoder" />
	</bean>
	
	<!-- Login Protocols these decide what handlers are in the pipeline during 
		login of a client to nadron -->
	<bean id="httpLoginProtocol" class="io.nadron.handlers.netty.LoginProtocol.HTTPProtocol">
		<property name="webSocketLoginHandler" ref="webSocketLoginHandler" />
	</bean>
	
	<bean id="defaultNadLoginProtocol" class="io.nadron.handlers.netty.LoginProtocol.DefaultNadProtocol">
		<property name="eventDecoder" ref="eventDecoder" />
		<property name="loginHandler" ref="loginHandler" />
		<property name="lengthFieldPrepender" ref="lengthFieldPrepender" />
	</bean>
	
	
	<bean id="compositeLoginProtocol" class="io.nadron.handlers.netty.LoginProtocol.CompositeProtocol" scope="prototype">
		<property name="protocols">
			<list>
				<ref bean="defaultNadLoginProtocol" />
				<ref bean="httpLoginProtocol" />
			</list>
		</property>
	</bean>
	
</beans>




© 2015 - 2024 Weber Informatics LLC | Privacy Policy