public class ConnectorCredentialsInjector extends ResponseNegotiatorInjector
An example:
IManagedContainer container = IPluginContainer.INSTANCE; String connectorDescription = "localhost:2036"; String userID = "name"; String password = "secret"; IPasswordCredentialsProvider credentialsProvider = new PasswordCredentialsProvider(userID, password); container.addPostProcessor(new ConnectorCredentialsInjector(connectorDescription, credentialsProvider)); IConnector connector = (IConnector)container.getElement("org.eclipse.net4j.connectors", "tcp", connectorDescription); IChannel channel = connector.openChannel(); // ...
Constructor and Description |
---|
ConnectorCredentialsInjector(String connectorDescription,
IPasswordCredentialsProvider credentialsProvider) |
ConnectorCredentialsInjector(String connectorDescription,
IPasswordCredentialsProvider credentialsProvider,
String algorithmName) |
Modifier and Type | Method and Description |
---|---|
protected boolean |
filterConnectorDescription(String description) |
protected boolean |
filterElement(String productGroup,
String factoryType,
String description,
INegotiatorAware negotiatorAware) |
getNegotiator, process
public ConnectorCredentialsInjector(String connectorDescription, IPasswordCredentialsProvider credentialsProvider, String algorithmName)
connectorDescription
- The description of the IConnector that the negotiator shall be injected into, or null
to
bypass the description check.public ConnectorCredentialsInjector(String connectorDescription, IPasswordCredentialsProvider credentialsProvider)
connectorDescription
- The description of the IConnector that the negotiator shall be injected into, or null
to
bypass the description check.protected boolean filterElement(String productGroup, String factoryType, String description, INegotiatorAware negotiatorAware)
filterElement
in class ResponseNegotiatorInjector
protected boolean filterConnectorDescription(String description)
Copyright (c) 2014 Eike Stepper (Berlin, Germany) and others.
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