|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IRemoteServiceConsumer
Method Summary | |
---|---|
void |
addRemoteServiceListener(IRemoteServiceListener listener)
Add listener for remote service registration/unregistration for this container |
org.eclipse.equinox.concurrent.future.IFuture |
asyncGetRemoteServiceReferences(ID[] idFilter,
java.lang.String clazz,
java.lang.String filter)
Asynchronously returns an array of IRemoteServiceReference objects. |
org.eclipse.equinox.concurrent.future.IFuture |
asyncGetRemoteServiceReferences(ID target,
ID[] idFilter,
java.lang.String clazz,
java.lang.String filter)
Asynchronously returns an array of IRemoteServiceReference objects. |
org.eclipse.equinox.concurrent.future.IFuture |
asyncGetRemoteServiceReferences(ID target,
java.lang.String clazz,
java.lang.String filter)
Asynchronously returns an array of IRemoteServiceReference objects. |
IRemoteFilter |
createRemoteFilter(java.lang.String filter)
Creates a IRemoteFilter object. |
IRemoteServiceReference[] |
getAllRemoteServiceReferences(java.lang.String clazz,
java.lang.String filter)
Returns an array of IRemoteServiceReference objects. |
IRemoteService |
getRemoteService(IRemoteServiceReference reference)
Get remote service for given IRemoteServiceReference. |
IRemoteServiceID |
getRemoteServiceID(ID containerID,
long containerRelativeID)
Get a remote service ID from a containerID and a containerRelative long value. |
Namespace |
getRemoteServiceNamespace()
Get namespace to use for this remote service provider. |
IRemoteServiceReference |
getRemoteServiceReference(IRemoteServiceID serviceID)
Get the remote service reference known to this container for the given IRemoteServiceID. |
IRemoteServiceReference[] |
getRemoteServiceReferences(ID[] idFilter,
java.lang.String clazz,
java.lang.String filter)
Returns an array of IRemoteServiceReference objects. |
IRemoteServiceReference[] |
getRemoteServiceReferences(ID target,
ID[] idFilter,
java.lang.String clazz,
java.lang.String filter)
Returns an array of IRemoteServiceReference objects. |
IRemoteServiceReference[] |
getRemoteServiceReferences(ID target,
java.lang.String clazz,
java.lang.String filter)
Returns an array of IRemoteServiceReference objects. |
void |
removeRemoteServiceListener(IRemoteServiceListener listener)
Remove remote service registration/unregistration listener for this container. |
void |
setConnectContextForAuthentication(IConnectContext connectContext)
Set connect context for authentication upon subsequent calls to getRemoteServiceReferences(ID[], String, String) or asyncGetRemoteServiceReferences(ID[], String, String) . |
boolean |
ungetRemoteService(IRemoteServiceReference reference)
Unget IRemoteServiceReference. |
Methods inherited from interface org.eclipse.core.runtime.IAdaptable |
---|
getAdapter |
Method Detail |
---|
void addRemoteServiceListener(IRemoteServiceListener listener)
listener
- notified of service registration/unregistration events. Must
not be null
.void removeRemoteServiceListener(IRemoteServiceListener listener)
listener
- to remove. Must not be null
.IRemoteServiceReference[] getRemoteServiceReferences(ID target, ID[] idFilter, java.lang.String clazz, java.lang.String filter) throws org.osgi.framework.InvalidSyntaxException, ContainerConnectException
IRemoteServiceReference
objects. The
returned array of IRemoteServiceReference
objects contains
services that were registered under the specified class and match the
specified idFilter, and filter criteria.
Note this method assumes that the enclosing container has previously
been connected, and uses the idFilter to filter among targets within the
previously connected set of container IDs. To request connection as
part of reference lookup, see getRemoteServiceReferences(ID, String, String)
.
The list is valid at the time of the call to this method, however since the Framework is a very dynamic environment, services can be modified or unregistered at anytime.
target
is a remote container to connect to. If null
, no connection attempt is made.
idFilter
is used to select a registered services that were
registered by a given set of containers with id in idFilter. Only
services exposed by a container with id in idFilter will be returned. If idFilter
is null
, all containers are
considered to match the filter.
filter
is used to select the registered service whose
properties objects contain keys and values which satisfy the filter. See
Filter
for a description of the filter string syntax.
If filter
is null
, all registered services
are considered to match the filter. If filter
cannot be
parsed, an InvalidSyntaxException
will be thrown with a human
readable message where the filter became unparsable.
target
- a target container to connect to if enclosing container is not already
connected. May be null
.idFilter
- an array of ID instances that will restrict the search for
matching container ids If null, all remote containers will be
considered in search for matching IRemoteServiceReference
instances. May be null
.clazz
- the fully qualified name of the interface class that describes
the desired service. Must not be null
.filter
- The filter criteria. May be null
.
null
if no services are found that match the search.
org.osgi.framework.InvalidSyntaxException
- If filter contains an invalid filter string that cannot be parsed.
ContainerConnectException
org.eclipse.equinox.concurrent.future.IFuture asyncGetRemoteServiceReferences(ID target, ID[] idFilter, java.lang.String clazz, java.lang.String filter)
IRemoteServiceReference
objects. The
returned array of IRemoteServiceReference
objects contains
services that were registered under the specified class and match the
specified idFilter, and filter criteria.
The IFuture is returned immediately, and subsequent calls to IFuture.get()
or IFuture.get(long)
will return the actual results received. The type of
the Object returned from IFuture.get()
will be IRemoteServiceReference [].
The list is valid at the time of the call to this method, however since the Framework is a very dynamic environment, services can be modified or unregistered at anytime.
target
is a remote container to connect to. If null
, no connection attempt is made.
idFilter
is used to select a registered services that were
registered by a given set of containers with id in idFilter. Only
services exposed by a container with id in idFilter will be returned. If idFilter
is null
, all containers are
considered to match the filter.
filter
is used to select the registered service whose
properties objects contain keys and values which satisfy the filter. See
Filter
for a description of the filter string syntax.
If filter
is null
, all registered services
are considered to match the filter. If filter
cannot be
parsed, an InvalidSyntaxException
will be thrown with a human
readable message where the filter became unparsable.
target
- an target to connect to if enclosing container is not already
connected. May be null
.idFilter
- an array of ID instances that will restrict the search for
matching container ids If null, all remote containers will be
considered in search for matching IRemoteServiceReference
instances. May be null
.clazz
- the fully qualified name of the interface class that describes
the desired service. Must not be null
.filter
- The filter criteria. May be null
.
null
.IRemoteServiceReference[] getRemoteServiceReferences(ID[] idFilter, java.lang.String clazz, java.lang.String filter) throws org.osgi.framework.InvalidSyntaxException
IRemoteServiceReference
objects. The
returned array of IRemoteServiceReference
objects contains
services that were registered under the specified class and match the
specified idFilter, and filter criteria.
Note this method assumes that the enclosing container has previously
been connected, and uses the idFilter to filter among targets within the
previously connected set of container IDs. To request connection as
part of reference lookup, see getRemoteServiceReferences(ID, String, String)
.
The list is valid at the time of the call to this method, however since the Framework is a very dynamic environment, services can be modified or unregistered at anytime.
idFilter
is used to select a registered services that were
registered by a given set of containers with id in idFilter. Only
services exposed by a container with id in idFilter will be returned.
If idFilter
is null
, all containers are
considered to match the filter.
filter
is used to select the registered service whose
properties objects contain keys and values which satisfy the filter. See
Filter
for a description of the filter string syntax.
If filter
is null
, all registered services
are considered to match the filter. If filter
cannot be
parsed, an InvalidSyntaxException
will be thrown with a human
readable message where the filter became unparsable.
idFilter
- an array of ID instances that will restrict the search for
matching container ids If null, all remote containers will be
considered in search for matching IRemoteServiceReference
instances. May be null
.clazz
- the fully qualified name of the interface class that describes
the desired service. Must not be null
.filter
- The filter criteria. May be null
.
null
if no services are found that match the search.
org.osgi.framework.InvalidSyntaxException
- If filter contains an invalid filter string that cannot be parsed.IRemoteServiceReference[] getRemoteServiceReferences(ID target, java.lang.String clazz, java.lang.String filter) throws org.osgi.framework.InvalidSyntaxException, ContainerConnectException
Returns an array of IRemoteServiceReference
objects. The
returned array of IRemoteServiceReference
objects contains
services that were registered under the specified class and match the
specified idFilter, and filter criteria.
The list is valid at the time of the call to this method, however since the Framework is a very dynamic environment, services can be modified or unregistered at anytime.
target is a remote container to connect to.
filter
is used to select the registered service whose
properties objects contain keys and values which satisfy the filter. See
Filter
for a description of the filter string syntax.
If filter
is null
, all registered services
are considered to match the filter. If filter
cannot be
parsed, an InvalidSyntaxException
will be thrown with a human
readable message where the filter became unparsable.
target
- an target to connect to if enclosing container is not already
connected. May be null
.clazz
- the fully qualified name of the interface class that describes
the desired service. Must not be null
.filter
- The filter criteria. May be null
.
null
if no services are found that match the search.
org.osgi.framework.InvalidSyntaxException
- If filter contains an invalid filter string that cannot be parsed.
ContainerConnectException
org.eclipse.equinox.concurrent.future.IFuture asyncGetRemoteServiceReferences(ID[] idFilter, java.lang.String clazz, java.lang.String filter)
IRemoteServiceReference
objects. The
returned array of IRemoteServiceReference
objects contains
services that were registered under the specified class and match the
specified idFilter, and filter criteria.
Note this method assumes that the enclosing container has previously
been connected, and uses the idFilter to filter among targets within the
previously connected set of container IDs. To request connection as
part of reference lookup, see getRemoteServiceReferences(ID, String, String)
.
The IFuture is returned immediately, and subsequent calls to IFuture.get()
or IFuture.get(long)
will return the actual results received. The type of
the Object returned from IFuture.get()
will be IRemoteServiceReference [].
The list is valid at the time of the call to this method, however since the Framework is a very dynamic environment, services can be modified or unregistered at anytime.
idFilter
is used to select a registered services that were
registered by a given set of containers with id in idFilter. Only
services exposed by a container with id in idFilter will be returned.
If idFilter
is null
, all containers are
considered to match the filter.
filter
is used to select the registered service whose
properties objects contain keys and values which satisfy the filter. See
Filter
for a description of the filter string syntax.
idFilter
- an array of ID instances that will restrict the search for
matching container ids If null, all remote containers will be
considered in search for matching IRemoteServiceReference
instances. May be null
.clazz
- the fully qualified name of the interface class that describes
the desired service. Must not be null
.filter
- The filter criteria. May be null
.
null
.org.eclipse.equinox.concurrent.future.IFuture asyncGetRemoteServiceReferences(ID target, java.lang.String clazz, java.lang.String filter)
IRemoteServiceReference
objects. The
returned array of IRemoteServiceReference
objects contains
services that were registered under the specified class and match the
specified idFilter, and filter criteria.
The IFuture is returned immediately, and subsequent calls to IFuture.get()
or IFuture.get(long)
will return the actual results received. The type of
the Object returned from IFuture.get()
will be IRemoteServiceReference [].
The list is valid at the time of the call to this method, however since the Framework is a very dynamic environment, services can be modified or unregistered at anytime.
idFilter
is used to select a registered services that were
registered by a given set of containers with id in idFilter. Only
services exposed by a container with id in idFilter will be returned.
target is a remote container to connect to.
filter
is used to select the registered service whose
properties objects contain keys and values which satisfy the filter. See
Filter
for a description of the filter string syntax.
target
- an target to connect to if enclosing container is not already
connected. May be null
.clazz
- the fully qualified name of the interface class that describes
the desired service. Must not be null
.filter
- The filter criteria. May be null
.
null
.IRemoteServiceReference[] getAllRemoteServiceReferences(java.lang.String clazz, java.lang.String filter) throws org.osgi.framework.InvalidSyntaxException
Returns an array of IRemoteServiceReference
objects. The
returned array of IRemoteServiceReference
objects contains
services that were registered under the specified class, or if the clazz
parameter is null
all services registered.
The list is valid at the time of the call to this method, however since the remote service container is a very dynamic environment, services can be modified or unregistered at anytime.
filter
is used to select the registered service whose
properties objects contain keys and values which satisfy the filter. See
Filter
for a description of the filter string syntax.
If filter
is null
, all registered services
are considered to match the filter. If filter
cannot be
parsed, an InvalidSyntaxException
will be thrown with a human
readable message where the filter became unparsable.
clazz
- the fully qualified name of the interface class that describes
the desired service. May be null
.filter
- The filter criteria. May be null
.
null
if no services are found that match the search.
org.osgi.framework.InvalidSyntaxException
- If filter contains an invalid filter string that cannot be parsed.Namespace getRemoteServiceNamespace()
null
.IRemoteServiceID getRemoteServiceID(ID containerID, long containerRelativeID)
null
if not.
containerID
- the containerID that is the server/host for the remote service. Must not be null
. This
must be the containerID for the server/host of the remote service.containerRelativeID
- the long value identifying the remote service relative to the container ID.
null
if it is not.IRemoteServiceReference getRemoteServiceReference(IRemoteServiceID serviceID)
serviceID
- the serviceID to retrieve the IRemoteServiceReference for.
null
if no IRemoteServiceReference found for the given serviceID.IRemoteService getRemoteService(IRemoteServiceReference reference)
IRemoteServiceContainerAdapter.ungetRemoteService(IRemoteServiceReference)
when the IRemoteService will no longer be used.
reference
- the IRemoteServiceReference for the desired service. Must not
be null
.
null
is
returned.ungetRemoteService(IRemoteServiceReference)
boolean ungetRemoteService(IRemoteServiceReference reference)
IRemoteServiceContainerAdapter.getRemoteService(IRemoteServiceReference)
.
If this method returns true, then the previously used IRemoteService will
no longer be usable.
reference
- the IRemoteServiceReference to unget
getRemoteService(IRemoteServiceReference)
IRemoteFilter createRemoteFilter(java.lang.String filter) throws org.osgi.framework.InvalidSyntaxException
IRemoteFilter
object. This IRemoteFilter
object may
be used to match a IRemoteServiceReference
object or a
Dictionary
object.
If the filter cannot be parsed, an InvalidSyntaxException
will be
thrown with a human readable message where the filter became unparsable.
filter
- The filter string.
IRemoteFilter
object encapsulating the filter string.
org.osgi.framework.InvalidSyntaxException
- If filter
contains an invalid
filter string that cannot be parsed.
java.lang.NullPointerException
- If filter
is null.
java.lang.IllegalStateException
- If this IRemoteServiceContainerAdapter is no
longer valid.FrameworkUtil.createFilter(String)
void setConnectContextForAuthentication(IConnectContext connectContext)
getRemoteServiceReferences(ID[], String, String)
or asyncGetRemoteServiceReferences(ID[], String, String)
. This
method should be called with a non-null connectContext in order to allow
authentication to occur during.
connectContext
- the connect context to use for authenticating.
If null
, then no authentication will be
attempted.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |