summaryrefslogtreecommitdiff
path: root/java/demo/IceBox/hello/HelloServiceI.java
blob: b724ce365b3ed5d39f151424db2ccdea9c01f32e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
// **********************************************************************
//
// Copyright (c) 2002
// MutableRealms, Inc.
// Huntsville, AL, USA
//
// All Rights Reserved
//
// **********************************************************************

public class HelloServiceI implements IceBox.Service
{
    public void
    init(String name, Ice.Communicator communicator, Ice.Properties properties, String[] args)
        throws IceBox.FailureException
    {
        _adapter = communicator.createObjectAdapter(name + "Adapter");
        Ice.Object object = new HelloI(communicator);
        _adapter.add(object, Ice.Util.stringToIdentity("hello"));
        _adapter.activate();
    }

    public void
    start()
        throws IceBox.FailureException
    {
    }

    public void
    stop()
    {
        _adapter.deactivate();
    }

    private Ice.ObjectAdapter _adapter;
}