2
|
1 |
/*
|
|
2 |
* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
|
|
3 |
* All rights reserved.
|
|
4 |
* This component and the accompanying materials are made available
|
|
5 |
* under the terms of the License "Eclipse Public License v1.0"
|
|
6 |
* which accompanies this distribution, and is available
|
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
|
8 |
*
|
|
9 |
* Initial Contributors:
|
|
10 |
* Nokia Corporation - initial contribution.
|
|
11 |
*
|
|
12 |
* Contributors:
|
|
13 |
*
|
|
14 |
* Description:
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
/**
|
|
18 |
*
|
|
19 |
*/
|
|
20 |
package com.nokia.tcf.api;
|
|
21 |
|
|
22 |
import org.eclipse.core.runtime.IStatus;
|
|
23 |
|
|
24 |
/**
|
|
25 |
* This interface the basis of all connection type classes. Instantiate one of these classes using
|
|
26 |
* the TCFClassFactory for the connection type required.
|
|
27 |
*
|
|
28 |
*/
|
|
29 |
public interface ITCConnection {
|
|
30 |
|
|
31 |
/**
|
|
32 |
* Default retry interval and retry timeout (in seconds)
|
|
33 |
*/
|
|
34 |
public final long DEFAULT_COMM_ERROR_RETRY_INTERVAL = 1; // 1 second
|
|
35 |
public final long DEFAULT_COMM_ERROR_RETRY_TIMEOUT = 5*60; // 5 minutes
|
|
36 |
|
|
37 |
/**
|
|
38 |
* Return a string detailing this connection
|
|
39 |
* @return
|
|
40 |
*/
|
|
41 |
public String getConnectionDescription();
|
|
42 |
/**
|
|
43 |
* Return connection type
|
|
44 |
* @return
|
|
45 |
*/
|
60
|
46 |
public String getConnectionType();
|
2
|
47 |
/**
|
|
48 |
* Get the current retry interval in seconds
|
|
49 |
* @return
|
|
50 |
*/
|
|
51 |
public long getRetryInterval();
|
|
52 |
/**
|
|
53 |
* Get the current retry timeout in seconds
|
|
54 |
* @return
|
|
55 |
*/
|
|
56 |
public long getRetryTimeout();
|
|
57 |
/**
|
|
58 |
* Set the connection type
|
|
59 |
* @param inConnectionType
|
|
60 |
* @return IStatus
|
|
61 |
*/
|
60
|
62 |
public IStatus setConnectionType(String inConnectionType);
|
2
|
63 |
|
|
64 |
/**
|
|
65 |
* Set the retry interval after a comm error in seconds. The default is 1 second.
|
|
66 |
* Must be >= 1 second and less then retry timeout.
|
|
67 |
*
|
|
68 |
* @param inRetryInterval in seconds
|
|
69 |
* @return IStatus
|
|
70 |
*/
|
|
71 |
public IStatus setRetryInterval(long inRetryInterval);
|
|
72 |
/**
|
|
73 |
* Set the retry timeout after a comm error in seconds. The default is 5 minutes.
|
|
74 |
* Must be > then the retry interval.
|
|
75 |
*
|
|
76 |
* @param inRetryTimeout in seconds
|
|
77 |
* @return IStatus
|
|
78 |
*/
|
|
79 |
public IStatus setRetryTimeout(long inRetryTimeout);
|
|
80 |
|
|
81 |
/**
|
|
82 |
* Specify which message format to decode on incoming messages
|
|
83 |
* A string to indicate the formatting types
|
|
84 |
* e.g. "platsim", "ost", etc.
|
|
85 |
*
|
|
86 |
* @param inDecodeFormat
|
|
87 |
*/
|
|
88 |
public IStatus setDecodeFormat(String inDecodeFormat);
|
|
89 |
|
|
90 |
/**
|
|
91 |
* Returns the current decode format for this connection
|
|
92 |
*
|
|
93 |
* @return
|
|
94 |
*/
|
|
95 |
public String getDecodeFormat();
|
|
96 |
}
|