Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Eclipse Communications Framework (ECF) » extension to EP org.eclipse.ecf.containerFactory
extension to EP org.eclipse.ecf.containerFactory [message #607482] Fri, 28 July 2006 17:14 Go to next message
Ilaria is currently offline IlariaFriend
Messages: 7
Registered: July 2009
Junior Member
Hi,
we are implementing an application using the Container provided by
org.eclipse.ecf.provider.
The application doesn't work without an extension to the extension-point
org.eclipse.ecf.containerFactory (as in

org.eclipse.ecf.example.collab).

The description of the extension-point says " This extension allows
plugins to register themselves as 'providers' of ECF

containers...", but we are not providing a container, we are using the
container provided by org.eclipse.ecf.provider.
So, we have "moved" the extension from our plug-in to
org.eclipse.ecf.provider, but we would ask you if it is the same, and

why you have preferred to add the extension in org.eclipse.ecf.collab
(that also uses the container provided

org.eclipse.ecf.provider) instead of in org.eclipse.ecf.provider.

Many thanks
ilaria
Re: extension to EP org.eclipse.ecf.containerFactory [message #607484 is a reply to message #607482] Sat, 29 July 2006 23:21 Go to previous message
Scott Lewis is currently offline Scott LewisFriend
Messages: 1038
Registered: July 2009
Senior Member
Hi Ilaria,

Ilaria Manno wrote:
> Hi,
> we are implementing an application using the Container provided by
> org.eclipse.ecf.provider.
> The application doesn't work without an extension to the extension-point
> org.eclipse.ecf.containerFactory (as in
> org.eclipse.ecf.example.collab).
>
> The description of the extension-point says " This extension allows
> plugins to register themselves as 'providers' of ECF
> containers...", but we are not providing a container, we are using the
> container provided by org.eclipse.ecf.provider.


If all you want to do is use the generic container
(TCPClientSOContainer) then the solution you describe of moving the
containerFactory declaration to the org.eclipse.ecf.provider plugin is
OK. Actually, as I say below I think it's declaration in
org.eclipse.ecf.example.collab may have just been a mistake.

BUT if you need/want to override methods on TCPClientSOContainer or
super classes (ClientSOContainer and SOContainer) to customize the
behavior of the container, then it would make the most sense to define a
(perhaps trivial) new subclass..e.g.

public class MyGenericContainer extends TCPClientSOContainer {

public MyGenericContainer() { ... }

public void methodToOverride(...) { ... }

}

}

Then, you can define a new IContainerInstantiator implementor to return
an instance of your subclass...e.g.:

public MyContainerInstantiator implements IContainerInstantiator {
....

public IContainer createInstance(
ContainerTypeDescription description, Class[] argTypes,
Object[] args) throws ContainerInstantiationException {
....
return new MyGenericContainer();
}

}


then, you can declare in your plugin.xml an extension of the
containerFactory extension point and define your MyContainerInstantiator
as the class for the factory...e.g:


<extension
point="org.eclipse.ecf.containerFactory">
<containerFactory
class="org.whatever.mygeneric.MyContainerInstantiator"
name="my.generic.client"/>
</extension>


And then you would get a MyGenericContainer via the following call:

IContainer container =
ContainerFactory.getDefault().createContainer("my.generic.client ");


}> So, we have "moved" the extension from our plug-in to
> org.eclipse.ecf.provider, but we would ask you if it is the same, and
> why you have preferred to add the extension in org.eclipse.ecf.collab
> (that also uses the container provided
> org.eclipse.ecf.provider) instead of in org.eclipse.ecf.provider.


It was in org.eclipse.ecf.provider originally. I think it was moved to
collab accidently, actually. At some point in the near future, I will
fix this and move it's declaration back to org.eclipse.ecf.provider.
Thanks for the report. I've filed this as a bug so it doesn't get lost:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=152261

Scott
Previous Topic:Receiving a file with FileShare
Next Topic:How to get XMPPConnection from XMPPClientSOContainer
Goto Forum:
  


Current Time: Fri Apr 19 18:42:48 GMT 2024

Powered by FUDForum. Page generated in 0.02696 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top