Java Code Examples for org.eclipse.equinox.p2.core.IProvisioningAgentProvider#createAgent()
The following examples show how to use
org.eclipse.equinox.p2.core.IProvisioningAgentProvider#createAgent() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: Activator.java From neoscada with Eclipse Public License 1.0 | 5 votes |
public static IProvisioningAgent getAgent ( final URI location ) throws ProvisionException { final IProvisioningAgentProvider provider = INSTANCE.tracker.getService (); if ( provider == null ) { throw new IllegalStateException ( "Provisioning agent provider not found. Is P2 started?" ); } return provider.createAgent ( location ); }
Example 2
Source File: Activator.java From neoscada with Eclipse Public License 1.0 | 5 votes |
public static IProvisioningAgent getAgent ( final URI location ) throws ProvisionException { final IProvisioningAgentProvider provider = INSTANCE.tracker.getService (); if ( provider == null ) { throw new IllegalStateException ( "Provisioning agent provider not found. Is P2 started?" ); } return provider.createAgent ( location ); }
Example 3
Source File: ProvisioningAgentProvider.java From statecharts with Eclipse Public License 1.0 | 5 votes |
@SuppressWarnings({ "rawtypes", "unchecked" }) public IProvisioningAgent get() throws ProvisionException { ServiceReference sr = getContext().getServiceReference(IProvisioningAgentProvider.SERVICE_NAME); if (sr == null) { throw new ProvisionException("No service reference found for " + IProvisioningAgentProvider.SERVICE_NAME); } IProvisioningAgentProvider agentProvider = (IProvisioningAgentProvider) getContext().getService(sr); return agentProvider.createAgent(null); }