Package com.tangosol.net
Interface NameService
- All Superinterfaces:
ClassLoaderAware
,Controllable
,Service
,Service
A NameService is a service that accepts connections from external clients
(e.g. Coherence*Extend) and provides a name lookup service.
- Since:
- 12.1.2
- Author:
- phf 2012.03.05
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interface
An object which implementsNameService.LookupCallback
can be registered with aNameService
viaaddLookupCallback(com.tangosol.net.NameService.LookupCallback)
to perform a lookup on names that were not found in the NameService's directory.static interface
An object which implementsNameService.RequestContext
stores information about the NameService request.static interface
During thelookup
call, if the retrieved object isNameService.Resolvable
, then the result of theresolve
call is returned.Nested classes/interfaces inherited from interface com.tangosol.net.Service
Service.MemberJoinAction
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoid
addLookupCallback
(NameService.LookupCallback callback) Register aNameService.LookupCallback
to be used to perform lookups on names that are not bound to theNameService
's directory.void
Binds a name to an object.Retrieve the running or configured listening address.Retrieves the named object.void
Unbinds the named object.Methods inherited from interface com.tangosol.io.ClassLoaderAware
getContextClassLoader, setContextClassLoader
Methods inherited from interface com.tangosol.util.Controllable
configure, isRunning, shutdown, start, stop
Methods inherited from interface com.tangosol.net.Service
addMemberListener, getCluster, getDependencies, getInfo, getMinimumServiceVersion, getResourceRegistry, getSerializer, getUserContext, isSuspended, isVersionCompatible, isVersionCompatible, isVersionCompatible, isVersionCompatible, removeMemberListener, setDependencies, setUserContext
Methods inherited from interface com.tangosol.util.Service
addServiceListener, removeServiceListener
-
Field Details
-
NAME_DEFAULT
Default service name for the NameService.- See Also:
-
TYPE_REMOTE
Remote name service type constant.- See Also:
-
-
Method Details
-
addLookupCallback
Register aNameService.LookupCallback
to be used to perform lookups on names that are not bound to theNameService
's directory.If more than one
NameService.LookupCallback
is registered, they are called in the order in which they are registered with theNameService
.- Parameters:
callback
- theNameService.LookupCallback
to register- Since:
- 12.2.1
-
bind
Binds a name to an object.- Parameters:
sName
- the name to bind; may not be emptyo
- the object to bind; possibly null- Throws:
NameAlreadyBoundException
- if name is already boundNamingException
- if a naming exception is encountered
-
getLocalAddress
InetAddress getLocalAddress()Retrieve the running or configured listening address.- Returns:
- the running or configured listening address
- Since:
- 12.2.1
-
lookup
Retrieves the named object. If the retrieved object isNameService.Resolvable
, then the result of theresolve
call is returned.- Parameters:
sName
- the name of the object to look up- Returns:
- the object bound to the specified name or the result of the
resolve
call if the bound object isNameService.Resolvable
- Throws:
NamingException
- if a naming exception is encountered
-
unbind
Unbinds the named object.- Parameters:
sName
- the name to bind; may not be empty- Throws:
NamingException
- if a naming exception is encountered
-