ICE 3.4.2
[php5-ice-freebsdport.git] / vb / demo / Ice / invoke / Server.vb
blobc6c9945bef2b9e90851345322cee6e9b386c33f3
1 ' **********************************************************************
3 ' Copyright (c) 2003-2011 ZeroC, Inc. All rights reserved.
5 ' This copy of Ice is licensed to you under the terms described in the
6 ' ICE_LICENSE file included in this distribution.
8 ' **********************************************************************
10 Imports InvokeDemo
11 Imports System
13 Module InvokeS
15 Class Server
16 Inherits Ice.Application
18 Public Overloads Overrides Function run(ByVal args() As String) As Integer
19 If args.Length > 0 Then
20 Console.Error.WriteLine(appName() & ": too many arguments")
21 Return 1
22 End If
24 Dim adapter As Ice.ObjectAdapter = communicator().createObjectAdapter("Printer")
25 adapter.add(New PrinterI, communicator().stringToIdentity("printer"))
26 adapter.activate()
27 communicator.waitForShutdown()
28 Return 0
29 End Function
30 End Class
32 Public Sub Main(ByVal args() As String)
33 Dim app As Server = New Server
34 Dim status As Integer = app.main(args, "config.server")
35 System.Environment.Exit(status)
36 End Sub
37 End Module