connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/interfaces/AbstractConnectedService.java
branchRCL_2_4
changeset 857 d66843399035
parent 405 068dfaa49bcc
child 898 b8f39c88d4f1
equal deleted inserted replaced
855:3f37e327885c 857:d66843399035
    16 */
    16 */
    17 package com.nokia.carbide.remoteconnections.interfaces;
    17 package com.nokia.carbide.remoteconnections.interfaces;
    18 
    18 
    19 import com.nokia.carbide.remoteconnections.Messages;
    19 import com.nokia.carbide.remoteconnections.Messages;
    20 import com.nokia.carbide.remoteconnections.interfaces.IConnectedService.IStatus.EStatus;
    20 import com.nokia.carbide.remoteconnections.interfaces.IConnectedService.IStatus.EStatus;
       
    21 import com.nokia.carbide.remoteconnections.internal.api.IConnectedService2;
    21 import com.nokia.cpp.internal.api.utils.core.Check;
    22 import com.nokia.cpp.internal.api.utils.core.Check;
    22 import com.nokia.cpp.internal.api.utils.core.ListenerList;
    23 import com.nokia.cpp.internal.api.utils.core.ListenerList;
    23 import com.nokia.cpp.internal.api.utils.core.ObjectUtils;
    24 import com.nokia.cpp.internal.api.utils.core.ObjectUtils;
    24 
    25 
    25 import org.eclipse.core.runtime.IProgressMonitor;
    26 import org.eclipse.core.runtime.IProgressMonitor;
    28 import org.eclipse.jface.operation.IRunnableWithProgress;
    29 import org.eclipse.jface.operation.IRunnableWithProgress;
    29 import org.eclipse.jface.wizard.WizardDialog;
    30 import org.eclipse.jface.wizard.WizardDialog;
    30 import org.eclipse.swt.widgets.Display;
    31 import org.eclipse.swt.widgets.Display;
    31 
    32 
    32 import java.lang.reflect.InvocationTargetException;
    33 import java.lang.reflect.InvocationTargetException;
    33 
    34 import java.util.HashMap;
    34 public abstract class AbstractConnectedService implements IConnectedService {
    35 import java.util.Map;
       
    36 
       
    37 public abstract class AbstractConnectedService implements IConnectedService2 {
    35 	
    38 	
    36 	public final static int TIMEOUT = 2000;
    39 	public final static int TIMEOUT = 2000;
    37 	
    40 	
    38 	public static class ConnectionFailException extends Exception {
    41 	public static class ConnectionFailException extends Exception {
    39 		public ConnectionFailException(String string) {
    42 		public ConnectionFailException(String string) {
   122 	private ListenerList<IStatusChangedListener> listeners;
   125 	private ListenerList<IStatusChangedListener> listeners;
   123 	protected IRunnableContext runnableContext;
   126 	protected IRunnableContext runnableContext;
   124 	protected Status currentStatus;
   127 	protected Status currentStatus;
   125 	protected Tester tester;
   128 	protected Tester tester;
   126 	protected boolean manualTesting;
   129 	protected boolean manualTesting;
       
   130 	private Map<String, String> properties;
   127 
   131 
   128 	public AbstractConnectedService(IService service, AbstractSynchronizedConnection connection) {
   132 	public AbstractConnectedService(IService service, AbstractSynchronizedConnection connection) {
   129 		this.service = service;
   133 		this.service = service;
   130 		this.connection = connection;
   134 		this.connection = connection;
       
   135 		properties = new HashMap<String, String>();
   131 	}
   136 	}
   132 	
   137 	
   133 	public void setRunnableContext(IRunnableContext runnableContext) {
   138 	public void setRunnableContext(IRunnableContext runnableContext) {
   134 		this.runnableContext = runnableContext;
   139 		this.runnableContext = runnableContext;
   135 	}
   140 	}
   227 			currentStatus.setEStatus(EStatus.UNKNOWN, 
   232 			currentStatus.setEStatus(EStatus.UNKNOWN, 
   228 					Messages.getString("AbstractConnectedService.NoTestingLabel"), //$NON-NLS-1$
   233 					Messages.getString("AbstractConnectedService.NoTestingLabel"), //$NON-NLS-1$
   229 					Messages.getString("AbstractConnectedService.UserDisabledMessage")); //$NON-NLS-1$
   234 					Messages.getString("AbstractConnectedService.UserDisabledMessage")); //$NON-NLS-1$
   230 		}
   235 		}
   231 	}
   236 	}
       
   237 	
       
   238 	public Map<String, String> getProperties() {
       
   239 		return properties;
       
   240 	}
   232 }
   241 }