mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-05 23:35:48 +02:00
[225507][api][breaking] RSE dstore API leaks non-API types
This commit is contained in:
parent
d4e117da9d
commit
db203efc29
14 changed files with 106 additions and 44 deletions
|
@ -17,6 +17,7 @@
|
||||||
* Martin Oberhuber (Wind River) - [219260][dstore][regression] Cannot connect to dstore daemon
|
* Martin Oberhuber (Wind River) - [219260][dstore][regression] Cannot connect to dstore daemon
|
||||||
* David McKnight (IBM) [220123][dstore] Configurable timeout on irresponsiveness
|
* David McKnight (IBM) [220123][dstore] Configurable timeout on irresponsiveness
|
||||||
* David McKnight (IBM) - [220892][dstore] Backward compatibility: Server and Daemon should support old clients
|
* David McKnight (IBM) - [220892][dstore] Backward compatibility: Server and Daemon should support old clients
|
||||||
|
* David McKnight (IBM) - [225507][api][breaking] RSE dstore API leaks non-API types
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
package org.eclipse.dstore.core.client;
|
package org.eclipse.dstore.core.client;
|
||||||
|
@ -45,8 +46,11 @@ import org.eclipse.dstore.core.model.DataStore;
|
||||||
import org.eclipse.dstore.core.model.DataStoreAttributes;
|
import org.eclipse.dstore.core.model.DataStoreAttributes;
|
||||||
import org.eclipse.dstore.core.model.IDataStoreCompatibilityHandler;
|
import org.eclipse.dstore.core.model.IDataStoreCompatibilityHandler;
|
||||||
import org.eclipse.dstore.core.model.IDataStoreConstants;
|
import org.eclipse.dstore.core.model.IDataStoreConstants;
|
||||||
|
import org.eclipse.dstore.core.model.IExternalLoader;
|
||||||
import org.eclipse.dstore.core.model.ISSLProperties;
|
import org.eclipse.dstore.core.model.ISSLProperties;
|
||||||
import org.eclipse.dstore.core.server.ServerLauncher;
|
import org.eclipse.dstore.core.server.ServerLauncher;
|
||||||
|
import org.eclipse.dstore.core.util.ssl.IDataStoreTrustManager;
|
||||||
|
import org.eclipse.dstore.extra.IDomainNotifier;
|
||||||
import org.eclipse.dstore.internal.core.client.ClientAttributes;
|
import org.eclipse.dstore.internal.core.client.ClientAttributes;
|
||||||
import org.eclipse.dstore.internal.core.client.ClientCommandHandler;
|
import org.eclipse.dstore.internal.core.client.ClientCommandHandler;
|
||||||
import org.eclipse.dstore.internal.core.client.ClientReceiver;
|
import org.eclipse.dstore.internal.core.client.ClientReceiver;
|
||||||
|
@ -59,6 +63,7 @@ import org.eclipse.dstore.internal.core.util.ssl.DataStoreTrustManager;
|
||||||
import org.eclipse.dstore.internal.extra.DomainNotifier;
|
import org.eclipse.dstore.internal.extra.DomainNotifier;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ClientConnection provides the standard means of creating a new connection to
|
* ClientConnection provides the standard means of creating a new connection to
|
||||||
* a DataStore.
|
* a DataStore.
|
||||||
|
@ -85,7 +90,7 @@ public class ClientConnection
|
||||||
private boolean _isConnected = false;
|
private boolean _isConnected = false;
|
||||||
private boolean _isRemote = false;
|
private boolean _isRemote = false;
|
||||||
private DataStore _dataStore;
|
private DataStore _dataStore;
|
||||||
private DomainNotifier _domainNotifier;
|
private IDomainNotifier _domainNotifier;
|
||||||
private Sender _sender;
|
private Sender _sender;
|
||||||
private ClientReceiver _receiver;
|
private ClientReceiver _receiver;
|
||||||
private ClientUpdateHandler _updateHandler;
|
private ClientUpdateHandler _updateHandler;
|
||||||
|
@ -144,7 +149,7 @@ public class ClientConnection
|
||||||
* @param name an identifier for this connection
|
* @param name an identifier for this connection
|
||||||
* @param notifier the notifier used to keep the user interface in synch with the DataStore
|
* @param notifier the notifier used to keep the user interface in synch with the DataStore
|
||||||
*/
|
*/
|
||||||
public ClientConnection(String name, DomainNotifier notifier)
|
public ClientConnection(String name, IDomainNotifier notifier)
|
||||||
{
|
{
|
||||||
_domainNotifier = notifier;
|
_domainNotifier = notifier;
|
||||||
_name = name;
|
_name = name;
|
||||||
|
@ -158,7 +163,7 @@ public class ClientConnection
|
||||||
* @param notifier the notifier used to keep the user interface in synch with the DataStore
|
* @param notifier the notifier used to keep the user interface in synch with the DataStore
|
||||||
* @param initialSize the number of elements to preallocate in the DataStore
|
* @param initialSize the number of elements to preallocate in the DataStore
|
||||||
*/
|
*/
|
||||||
public ClientConnection(String name, DomainNotifier notifier, int initialSize)
|
public ClientConnection(String name, IDomainNotifier notifier, int initialSize)
|
||||||
{
|
{
|
||||||
_domainNotifier = notifier;
|
_domainNotifier = notifier;
|
||||||
_name = name;
|
_name = name;
|
||||||
|
@ -214,7 +219,7 @@ public class ClientConnection
|
||||||
*
|
*
|
||||||
* @param loader the loader
|
* @param loader the loader
|
||||||
*/
|
*/
|
||||||
public void addLoader(ExternalLoader loader)
|
public void addLoader(IExternalLoader loader)
|
||||||
{
|
{
|
||||||
if (_loaders == null)
|
if (_loaders == null)
|
||||||
{
|
{
|
||||||
|
@ -420,7 +425,7 @@ public class ClientConnection
|
||||||
return connect(launchStatus.getTicket());
|
return connect(launchStatus.getTicket());
|
||||||
}
|
}
|
||||||
|
|
||||||
public DataStoreTrustManager getTrustManager()
|
public IDataStoreTrustManager getTrustManager()
|
||||||
{
|
{
|
||||||
if (_trustManager == null)
|
if (_trustManager == null)
|
||||||
{
|
{
|
||||||
|
@ -464,7 +469,7 @@ public class ClientConnection
|
||||||
{
|
{
|
||||||
String location = _dataStore.getKeyStoreLocation();
|
String location = _dataStore.getKeyStoreLocation();
|
||||||
String pw = _dataStore.getKeyStorePassword();
|
String pw = _dataStore.getKeyStorePassword();
|
||||||
DataStoreTrustManager mgr = getTrustManager();
|
IDataStoreTrustManager mgr = getTrustManager();
|
||||||
SSLContext context = DStoreSSLContext.getClientSSLContext(location, pw, mgr);
|
SSLContext context = DStoreSSLContext.getClientSSLContext(location, pw, mgr);
|
||||||
SSLSocketFactory factory = context.getSocketFactory();
|
SSLSocketFactory factory = context.getSocketFactory();
|
||||||
|
|
||||||
|
@ -731,7 +736,7 @@ public class ClientConnection
|
||||||
{
|
{
|
||||||
String location = _dataStore.getKeyStoreLocation();
|
String location = _dataStore.getKeyStoreLocation();
|
||||||
String pw = _dataStore.getKeyStorePassword();
|
String pw = _dataStore.getKeyStorePassword();
|
||||||
DataStoreTrustManager mgr = getTrustManager();
|
IDataStoreTrustManager mgr = getTrustManager();
|
||||||
SSLContext context = DStoreSSLContext.getClientSSLContext(location, pw, mgr);
|
SSLContext context = DStoreSSLContext.getClientSSLContext(location, pw, mgr);
|
||||||
|
|
||||||
try
|
try
|
||||||
|
|
|
@ -11,17 +11,20 @@
|
||||||
*
|
*
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* Noriaki Takatsu (IBM) [220126] [dstore][api][breaking] Single process server for multiple clients
|
* Noriaki Takatsu (IBM) [220126] [dstore][api][breaking] Single process server for multiple clients
|
||||||
|
* Jacob Garcowski (IBM) [225175] [dstore] [dstore] error handling change for Client
|
||||||
|
* David McKnight (IBM) - [225507][api][breaking] RSE dstore API leaks non-API types
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
package org.eclipse.dstore.core.model;
|
package org.eclipse.dstore.core.model;
|
||||||
|
|
||||||
import org.eclipse.dstore.core.server.IServerLogger;
|
import org.eclipse.dstore.core.server.IServerLogger;
|
||||||
|
import org.eclipse.dstore.core.server.ServerReceiver;
|
||||||
|
|
||||||
public class Client
|
public class Client
|
||||||
{
|
{
|
||||||
public String _userid;
|
public String _userid;
|
||||||
private IServerLogger _logger;
|
private IServerLogger _logger;
|
||||||
|
protected ServerReceiver _receiver;
|
||||||
|
|
||||||
public void setUserid(String userid)
|
public void setUserid(String userid)
|
||||||
{
|
{
|
||||||
|
@ -48,5 +51,15 @@ public class Client
|
||||||
return System.getProperty(key);
|
return System.getProperty(key);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void disconnectServerReceiver()
|
||||||
|
{
|
||||||
|
if (_receiver != null)
|
||||||
|
_receiver.finish();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setServerReceiver(ServerReceiver receiver)
|
||||||
|
{
|
||||||
|
_receiver = receiver;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2002, 2007 IBM Corporation and others.
|
* Copyright (c) 2002, 2008 IBM Corporation and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -12,7 +12,7 @@
|
||||||
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
|
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
|
||||||
*
|
*
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* {Name} (company) - description of contribution.
|
* David McKnight (IBM) - [225507][api][breaking] RSE dstore API leaks non-API types
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
package org.eclipse.dstore.core.model;
|
package org.eclipse.dstore.core.model;
|
||||||
|
@ -20,7 +20,7 @@ package org.eclipse.dstore.core.model;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
||||||
import org.eclipse.dstore.core.java.IRemoteClassInstance;
|
import org.eclipse.dstore.core.java.IRemoteClassInstance;
|
||||||
import org.eclipse.dstore.internal.core.util.CommandGenerator;
|
import org.eclipse.dstore.core.util.CommandGenerator;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
|
|
|
@ -19,6 +19,7 @@
|
||||||
* David McKnight (IBM) - [222168][dstore] Buffer in DataElement is not sent
|
* David McKnight (IBM) - [222168][dstore] Buffer in DataElement is not sent
|
||||||
* Noriaki Takatsu (IBM) - [220126] [dstore][api][breaking] Single process server for multiple clients
|
* Noriaki Takatsu (IBM) - [220126] [dstore][api][breaking] Single process server for multiple clients
|
||||||
* David McKnight (IBM) [224906] [dstore] changes for getting properties and doing exit due to single-process capability
|
* David McKnight (IBM) [224906] [dstore] changes for getting properties and doing exit due to single-process capability
|
||||||
|
* David McKnight (IBM) - [225507][api][breaking] RSE dstore API leaks non-API types
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
package org.eclipse.dstore.core.model;
|
package org.eclipse.dstore.core.model;
|
||||||
|
@ -55,10 +56,8 @@ import org.eclipse.dstore.internal.core.client.ClientCommandHandler;
|
||||||
import org.eclipse.dstore.internal.core.model.DefaultByteConverter;
|
import org.eclipse.dstore.internal.core.model.DefaultByteConverter;
|
||||||
import org.eclipse.dstore.internal.core.server.ServerUpdateHandler;
|
import org.eclipse.dstore.internal.core.server.ServerUpdateHandler;
|
||||||
import org.eclipse.dstore.internal.core.util.DataElementRemover;
|
import org.eclipse.dstore.internal.core.util.DataElementRemover;
|
||||||
import org.eclipse.dstore.internal.core.util.ExternalLoader;
|
|
||||||
import org.eclipse.dstore.internal.core.util.XMLgenerator;
|
import org.eclipse.dstore.internal.core.util.XMLgenerator;
|
||||||
import org.eclipse.dstore.internal.core.util.XMLparser;
|
import org.eclipse.dstore.internal.core.util.XMLparser;
|
||||||
import org.eclipse.dstore.internal.extra.DomainNotifier;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <code>DataStore</code> is the heart of the <code>DataStore</code> Distributed Tooling Framework.
|
* <code>DataStore</code> is the heart of the <code>DataStore</code> Distributed Tooling Framework.
|
||||||
|
@ -70,7 +69,7 @@ import org.eclipse.dstore.internal.extra.DomainNotifier;
|
||||||
* handler is responsible for sending commands, in the form of <code>DataElement</code> trees, to the appropriate
|
* handler is responsible for sending commands, in the form of <code>DataElement</code> trees, to the appropriate
|
||||||
* implementer, either directly to the miner, or indirectly over the communication layer through a server
|
* implementer, either directly to the miner, or indirectly over the communication layer through a server
|
||||||
* <code>DataStore</code>. The update handler is responsible for notifying listeners about changes in the
|
* <code>DataStore</code>. The update handler is responsible for notifying listeners about changes in the
|
||||||
* <code>DataStore</code>, either directly via a <code>DomainNotifier</code> or indirectly over the communication
|
* <code>DataStore</code>, either directly via a <code>IDomainNotifier</code> or indirectly over the communication
|
||||||
* layer through a client <code>DataStore</code>.
|
* layer through a client <code>DataStore</code>.
|
||||||
* </p>
|
* </p>
|
||||||
*
|
*
|
||||||
|
@ -103,7 +102,7 @@ public final class DataStore
|
||||||
private ByteStreamHandlerRegistry _byteStreamHandlerRegistry;
|
private ByteStreamHandlerRegistry _byteStreamHandlerRegistry;
|
||||||
private ClassByteStreamHandlerRegistry _classbyteStreamHandlerRegistry;
|
private ClassByteStreamHandlerRegistry _classbyteStreamHandlerRegistry;
|
||||||
|
|
||||||
private DomainNotifier _domainNotifier;
|
private IDomainNotifier _domainNotifier;
|
||||||
|
|
||||||
private ArrayList _loaders;
|
private ArrayList _loaders;
|
||||||
private ArrayList _minersLocations;
|
private ArrayList _minersLocations;
|
||||||
|
@ -208,7 +207,7 @@ public final class DataStore
|
||||||
* @param updateHandler the DataStore's handler for doing updates
|
* @param updateHandler the DataStore's handler for doing updates
|
||||||
* @param domainNotifier the domain notifier
|
* @param domainNotifier the domain notifier
|
||||||
*/
|
*/
|
||||||
public DataStore(DataStoreAttributes attributes, CommandHandler commandHandler, UpdateHandler updateHandler, DomainNotifier domainNotifier)
|
public DataStore(DataStoreAttributes attributes, CommandHandler commandHandler, UpdateHandler updateHandler, IDomainNotifier domainNotifier)
|
||||||
{
|
{
|
||||||
_dataStoreAttributes = attributes;
|
_dataStoreAttributes = attributes;
|
||||||
_commandHandler = commandHandler;
|
_commandHandler = commandHandler;
|
||||||
|
@ -231,7 +230,7 @@ public final class DataStore
|
||||||
* @param domainNotifier the domain notifier
|
* @param domainNotifier the domain notifier
|
||||||
* @param initialSize the initialNumber of preallocated <code>DataElement</code>s
|
* @param initialSize the initialNumber of preallocated <code>DataElement</code>s
|
||||||
*/
|
*/
|
||||||
public DataStore(DataStoreAttributes attributes, CommandHandler commandHandler, UpdateHandler updateHandler, DomainNotifier domainNotifier, int initialSize)
|
public DataStore(DataStoreAttributes attributes, CommandHandler commandHandler, UpdateHandler updateHandler, IDomainNotifier domainNotifier, int initialSize)
|
||||||
{
|
{
|
||||||
_dataStoreAttributes = attributes;
|
_dataStoreAttributes = attributes;
|
||||||
_commandHandler = commandHandler;
|
_commandHandler = commandHandler;
|
||||||
|
@ -301,7 +300,7 @@ public final class DataStore
|
||||||
*
|
*
|
||||||
* @param loader the loader for the miners this <code>DataStore</code> will be using
|
* @param loader the loader for the miners this <code>DataStore</code> will be using
|
||||||
*/
|
*/
|
||||||
public void addLoader(ExternalLoader loader)
|
public void addLoader(IExternalLoader loader)
|
||||||
{
|
{
|
||||||
if (_loaders == null)
|
if (_loaders == null)
|
||||||
{
|
{
|
||||||
|
@ -416,11 +415,11 @@ public final class DataStore
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the <code>DataStore</code>'s DomainNotifier
|
* Sets the <code>DataStore</code>'s IDomainNotifier
|
||||||
*
|
*
|
||||||
* @param domainNotifier the domainNotifier
|
* @param domainNotifier the domainNotifier
|
||||||
*/
|
*/
|
||||||
public void setDomainNotifier(DomainNotifier domainNotifier)
|
public void setDomainNotifier(IDomainNotifier domainNotifier)
|
||||||
{
|
{
|
||||||
_domainNotifier = domainNotifier;
|
_domainNotifier = domainNotifier;
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,9 +16,11 @@
|
||||||
* David McKnight (IBM) [220892][dstore] Backward compatibility: Server and Daemon should support old clients
|
* David McKnight (IBM) [220892][dstore] Backward compatibility: Server and Daemon should support old clients
|
||||||
* Noriaki Takatsu (IBM) - [220126] [dstore][api][breaking] Single process server for multiple clients
|
* Noriaki Takatsu (IBM) - [220126] [dstore][api][breaking] Single process server for multiple clients
|
||||||
* David McKnight (IBM) [224906] [dstore] changes for getting properties and doing exit due to single-process capability
|
* David McKnight (IBM) [224906] [dstore] changes for getting properties and doing exit due to single-process capability
|
||||||
|
* Jacob Garcowski (IBM) [225175] [dstore] error handling change for Client
|
||||||
|
* David McKnight (IBM) - [225507][api][breaking] RSE dstore API leaks non-API types
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
package org.eclipse.dstore.internal.core.server;
|
package org.eclipse.dstore.core.server;
|
||||||
|
|
||||||
import java.io.BufferedWriter;
|
import java.io.BufferedWriter;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
@ -40,7 +42,11 @@ import org.eclipse.dstore.core.model.DataElement;
|
||||||
import org.eclipse.dstore.core.model.DataStore;
|
import org.eclipse.dstore.core.model.DataStore;
|
||||||
import org.eclipse.dstore.core.model.DataStoreAttributes;
|
import org.eclipse.dstore.core.model.DataStoreAttributes;
|
||||||
import org.eclipse.dstore.core.model.ISSLProperties;
|
import org.eclipse.dstore.core.model.ISSLProperties;
|
||||||
import org.eclipse.dstore.core.server.SystemServiceManager;
|
import org.eclipse.dstore.internal.core.server.ServerAttributes;
|
||||||
|
import org.eclipse.dstore.internal.core.server.ServerCommandHandler;
|
||||||
|
import org.eclipse.dstore.internal.core.server.ServerReturnCodes;
|
||||||
|
import org.eclipse.dstore.internal.core.server.ServerSSLProperties;
|
||||||
|
import org.eclipse.dstore.internal.core.server.ServerUpdateHandler;
|
||||||
import org.eclipse.dstore.internal.core.util.ExternalLoader;
|
import org.eclipse.dstore.internal.core.util.ExternalLoader;
|
||||||
import org.eclipse.dstore.internal.core.util.Sender;
|
import org.eclipse.dstore.internal.core.util.Sender;
|
||||||
import org.eclipse.dstore.internal.core.util.ssl.DStoreSSLContext;
|
import org.eclipse.dstore.internal.core.util.ssl.DStoreSSLContext;
|
||||||
|
@ -220,6 +226,9 @@ public class ConnectionEstablisher
|
||||||
ServerReceiver receiver = new ServerReceiver(newSocket, this);
|
ServerReceiver receiver = new ServerReceiver(newSocket, this);
|
||||||
_dataStore.addDataStorePreferenceListener(receiver);
|
_dataStore.addDataStorePreferenceListener(receiver);
|
||||||
|
|
||||||
|
if (_dataStore.getClient() != null)
|
||||||
|
_dataStore.getClient().setServerReceiver(receiver);
|
||||||
|
|
||||||
Sender sender = new Sender(newSocket, _dataStore);
|
Sender sender = new Sender(newSocket, _dataStore);
|
||||||
|
|
||||||
// add this connection to list of elements
|
// add this connection to list of elements
|
|
@ -12,15 +12,15 @@
|
||||||
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
|
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
|
||||||
*
|
*
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* Noriaki Takatsu (IBM) - [220126] [dstore][api][breaking] Single process server for multiple clients
|
* Noriaki Takatsu (IBM) - [220126] [dstore][api][breaking] Single process server for multiple clients
|
||||||
* David McKnight (IBM) [224906] [dstore] changes for getting properties and doing exit due to single-process capability
|
* David McKnight (IBM) [224906] [dstore] changes for getting properties and doing exit due to single-process capability
|
||||||
|
* David McKnight (IBM) - [225507][api][breaking] RSE dstore API leaks non-API types
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
package org.eclipse.dstore.core.server;
|
package org.eclipse.dstore.core.server;
|
||||||
|
|
||||||
import java.util.StringTokenizer;
|
import java.util.StringTokenizer;
|
||||||
|
|
||||||
import org.eclipse.dstore.internal.core.server.ConnectionEstablisher;
|
|
||||||
import org.eclipse.dstore.internal.core.server.ServerReturnCodes;
|
import org.eclipse.dstore.internal.core.server.ServerReturnCodes;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -12,15 +12,15 @@
|
||||||
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
|
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
|
||||||
*
|
*
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* {Name} (company) - description of contribution.
|
* David McKnight (IBM) - [225507][api][breaking] RSE dstore API leaks non-API types
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
package org.eclipse.dstore.internal.core.server;
|
package org.eclipse.dstore.core.server;
|
||||||
|
|
||||||
import java.net.Socket;
|
import java.net.Socket;
|
||||||
|
|
||||||
import org.eclipse.dstore.core.model.DataElement;
|
import org.eclipse.dstore.core.model.DataElement;
|
||||||
import org.eclipse.dstore.internal.core.util.Receiver;
|
import org.eclipse.dstore.core.util.Receiver;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The ServerReciever is responsible for recieving data from
|
* The ServerReciever is responsible for recieving data from
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2002, 2007 IBM Corporation and others.
|
* Copyright (c) 2002, 2008 IBM Corporation and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -12,10 +12,10 @@
|
||||||
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
|
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
|
||||||
*
|
*
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* {Name} (company) - description of contribution.
|
* David McKnight (IBM) - [225507][api][breaking] RSE dstore API leaks non-API types
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
package org.eclipse.dstore.internal.core.util;
|
package org.eclipse.dstore.core.util;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
|
@ -15,9 +15,10 @@
|
||||||
* David McKnight (IBM) [220123][dstore] Configurable timeout on irresponsiveness
|
* David McKnight (IBM) [220123][dstore] Configurable timeout on irresponsiveness
|
||||||
* David McKnight (IBM) [222003] Client remains connected after server terminates
|
* David McKnight (IBM) [222003] Client remains connected after server terminates
|
||||||
* Noriaki Takatsu (IBM) - [220126] [dstore][api][breaking] Single process server for multiple clients
|
* Noriaki Takatsu (IBM) - [220126] [dstore][api][breaking] Single process server for multiple clients
|
||||||
|
* David McKnight (IBM) - [225507][api][breaking] RSE dstore API leaks non-API types
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
package org.eclipse.dstore.internal.core.util;
|
package org.eclipse.dstore.core.util;
|
||||||
|
|
||||||
import java.io.BufferedInputStream;
|
import java.io.BufferedInputStream;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
@ -28,6 +29,7 @@ import org.eclipse.dstore.core.model.DataElement;
|
||||||
import org.eclipse.dstore.core.model.DataStore;
|
import org.eclipse.dstore.core.model.DataStore;
|
||||||
import org.eclipse.dstore.core.model.IDataStorePreferenceListener;
|
import org.eclipse.dstore.core.model.IDataStorePreferenceListener;
|
||||||
import org.eclipse.dstore.core.server.SecuredThread;
|
import org.eclipse.dstore.core.server.SecuredThread;
|
||||||
|
import org.eclipse.dstore.internal.core.util.XMLparser;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This class is used for receiving data from a socket in the DataStore
|
* This class is used for receiving data from a socket in the DataStore
|
|
@ -0,0 +1,34 @@
|
||||||
|
/********************************************************************************
|
||||||
|
* Copyright (c) 2008 IBM Corporation. All rights reserved.
|
||||||
|
* This program and the accompanying materials are made available under the terms
|
||||||
|
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
|
||||||
|
* available at http://www.eclipse.org/legal/epl-v10.html
|
||||||
|
*
|
||||||
|
* Initial Contributors:
|
||||||
|
* The following IBM employees contributed to the Remote System Explorer
|
||||||
|
* component that contains this file: David McKnight.
|
||||||
|
*
|
||||||
|
* Contributors:
|
||||||
|
* David McKnight (IBM) - [225507][api][breaking] RSE dstore API leaks non-API types
|
||||||
|
********************************************************************************/
|
||||||
|
package org.eclipse.dstore.core.util.ssl;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import javax.net.ssl.X509TrustManager;
|
||||||
|
|
||||||
|
public interface IDataStoreTrustManager extends X509TrustManager
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Sets the path and password for the trust manager
|
||||||
|
* @param filePath the path
|
||||||
|
* @param password the password
|
||||||
|
*/
|
||||||
|
public void setKeystore(String filePath, String password);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the list of untrusted certificates
|
||||||
|
* @return the list of untrusted certificates
|
||||||
|
*/
|
||||||
|
public List getUntrustedCerts();
|
||||||
|
}
|
|
@ -22,7 +22,7 @@ import java.net.Socket;
|
||||||
import org.eclipse.dstore.core.model.DE;
|
import org.eclipse.dstore.core.model.DE;
|
||||||
import org.eclipse.dstore.core.model.DataElement;
|
import org.eclipse.dstore.core.model.DataElement;
|
||||||
import org.eclipse.dstore.core.model.DataStore;
|
import org.eclipse.dstore.core.model.DataStore;
|
||||||
import org.eclipse.dstore.internal.core.util.Receiver;
|
import org.eclipse.dstore.core.util.Receiver;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The ClientReciever is responsible for recieving data from
|
* The ClientReciever is responsible for recieving data from
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2002, 2007 IBM Corporation and others.
|
* Copyright (c) 2002, 2008 IBM Corporation and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -13,6 +13,7 @@
|
||||||
*
|
*
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* David McKnight (IBM) [222168][dstore] Buffer in DataElement is not sent
|
* David McKnight (IBM) [222168][dstore] Buffer in DataElement is not sent
|
||||||
|
* David McKnight (IBM) - [225507][api][breaking] RSE dstore API leaks non-API types
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
package org.eclipse.dstore.internal.core.server;
|
package org.eclipse.dstore.internal.core.server;
|
||||||
|
@ -26,7 +27,7 @@ import org.eclipse.dstore.core.model.DataElement;
|
||||||
import org.eclipse.dstore.core.model.DataStore;
|
import org.eclipse.dstore.core.model.DataStore;
|
||||||
import org.eclipse.dstore.core.model.DataStoreResources;
|
import org.eclipse.dstore.core.model.DataStoreResources;
|
||||||
import org.eclipse.dstore.core.model.UpdateHandler;
|
import org.eclipse.dstore.core.model.UpdateHandler;
|
||||||
import org.eclipse.dstore.internal.core.util.CommandGenerator;
|
import org.eclipse.dstore.core.util.CommandGenerator;
|
||||||
import org.eclipse.dstore.internal.core.util.Sender;
|
import org.eclipse.dstore.internal.core.util.Sender;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2006, 2007 IBM Corporation and others.
|
* Copyright (c) 2006, 2008 IBM Corporation and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -12,7 +12,7 @@
|
||||||
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
|
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
|
||||||
*
|
*
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* {Name} (company) - description of contribution.
|
* David McKnight (IBM) - [225507][api][breaking] RSE dstore API leaks non-API types
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
package org.eclipse.dstore.internal.core.util.ssl;
|
package org.eclipse.dstore.internal.core.util.ssl;
|
||||||
|
@ -24,6 +24,7 @@ import javax.net.ssl.SSLContext;
|
||||||
import javax.net.ssl.TrustManager;
|
import javax.net.ssl.TrustManager;
|
||||||
|
|
||||||
import org.eclipse.dstore.core.util.ssl.DStoreKeyStore;
|
import org.eclipse.dstore.core.util.ssl.DStoreKeyStore;
|
||||||
|
import org.eclipse.dstore.core.util.ssl.IDataStoreTrustManager;
|
||||||
|
|
||||||
|
|
||||||
public class DStoreSSLContext
|
public class DStoreSSLContext
|
||||||
|
@ -51,7 +52,7 @@ public class DStoreSSLContext
|
||||||
return serverContext;
|
return serverContext;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static SSLContext getClientSSLContext(String filePath, String password, DataStoreTrustManager trustManager)
|
public static SSLContext getClientSSLContext(String filePath, String password, IDataStoreTrustManager trustManager)
|
||||||
{
|
{
|
||||||
SSLContext clientContext = null;
|
SSLContext clientContext = null;
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2006, 2007 IBM Corporation and others.
|
* Copyright (c) 2006, 2008 IBM Corporation and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -12,7 +12,7 @@
|
||||||
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
|
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
|
||||||
*
|
*
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* {Name} (company) - description of contribution.
|
* David McKnight (IBM) - [225507][api][breaking] RSE dstore API leaks non-API types
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
package org.eclipse.dstore.internal.core.util.ssl;
|
package org.eclipse.dstore.internal.core.util.ssl;
|
||||||
|
@ -24,12 +24,10 @@ import java.util.ArrayList;
|
||||||
import java.util.Enumeration;
|
import java.util.Enumeration;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import javax.net.ssl.X509TrustManager;
|
|
||||||
|
|
||||||
import org.eclipse.dstore.core.util.ssl.DStoreKeyStore;
|
import org.eclipse.dstore.core.util.ssl.DStoreKeyStore;
|
||||||
|
import org.eclipse.dstore.core.util.ssl.IDataStoreTrustManager;
|
||||||
|
|
||||||
|
public class DataStoreTrustManager implements IDataStoreTrustManager
|
||||||
public class DataStoreTrustManager implements X509TrustManager
|
|
||||||
{
|
{
|
||||||
private KeyStore _keystore;
|
private KeyStore _keystore;
|
||||||
private List _untrustedCerts;
|
private List _untrustedCerts;
|
||||||
|
|
Loading…
Add table
Reference in a new issue