summaryrefslogtreecommitdiff
path: root/objective-c/test/Ice/adapterDeactivation/TestI.m
blob: b7ae7f12f6dd903159c5bc4a705455ea948ae0d8 (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
// **********************************************************************
//
// Copyright (c) 2003-2017 ZeroC, Inc. All rights reserved.
//
// This copy of Ice is licensed to you under the terms described in the
// ICE_LICENSE file included in this distribution.
//
// **********************************************************************

#import <objc/Ice.h>
#import <adapterDeactivation/TestI.h>

#import <Foundation/NSThread.h>

@implementation TestAdapterDeactivationI

-(void) transient:(ICECurrent*)current
{
    id<ICECommunicator> communicator = [current.adapter getCommunicator];
    id<ICEObjectAdapter> adapter =
        [communicator createObjectAdapterWithEndpoints:@"TransientTestAdapter" endpoints:@"default -p 9999"];
    [adapter activate];
    [adapter destroy];
}

-(void) deactivate:(ICECurrent*)current
{
    [current.adapter deactivate];
    [NSThread sleepForTimeInterval:1];
}
@end