Exemplo n.º 1
0
class AbitbolServer(object):
	"""
	The Abitbol server.

	"""
	settings = None

	def configure(self, settings):
		"""
		Configures the server before it can be run.

		"""
		self.settings = settings

	def run(self):
		"""
		Starts the server instance.

		"""
		if not self.settings:
			raise RuntimeError("The server is not configured.")

		self.transport = TransportFactory(self.settings.get('transport_type'))
		self.restServer = RestServer()

		self.transport.connect()
		self.restServer.run()
Exemplo n.º 2
0
	def run(self):
		"""
		Starts the server instance.

		"""
		if not self.settings:
			raise RuntimeError("The server is not configured.")

		self.transport = TransportFactory(self.settings.get('transport_type'))
		self.restServer = RestServer()

		self.transport.connect()
		self.restServer.run()