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 interfaceAn object which implementsNameService.LookupCallbackcan be registered with aNameServiceviaaddLookupCallback(com.tangosol.net.NameService.LookupCallback)to perform a lookup on names that were not found in the NameService's directory.static interfaceAn object which implementsNameService.RequestContextstores information about the NameService request.static interfaceDuring thelookupcall, if the retrieved object isNameService.Resolvable, then the result of theresolvecall is returned.Nested classes/interfaces inherited from interface com.tangosol.net.Service
Service.MemberJoinAction -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoidaddLookupCallback(NameService.LookupCallback callback) Register aNameService.LookupCallbackto be used to perform lookups on names that are not bound to theNameService's directory.voidBinds a name to an object.Retrieve the running or configured listening address.Retrieves the named object.voidUnbinds the named object.Methods inherited from interface com.tangosol.io.ClassLoaderAware
getContextClassLoader, setContextClassLoaderMethods inherited from interface com.tangosol.util.Controllable
configure, isRunning, shutdown, start, stopMethods inherited from interface com.tangosol.net.Service
addMemberListener, getCluster, getDependencies, getInfo, getMinimumServiceVersion, getResourceRegistry, getSerializer, getUserContext, isSuspended, isVersionCompatible, isVersionCompatible, isVersionCompatible, isVersionCompatible, removeMemberListener, setDependencies, setUserContextMethods 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.LookupCallbackto be used to perform lookups on names that are not bound to theNameService's directory.If more than one
NameService.LookupCallbackis registered, they are called in the order in which they are registered with theNameService.- Parameters:
callback- theNameService.LookupCallbackto 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 theresolvecall 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
resolvecall 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
-