public class DefaultClientDelegate<T> extends Object implements IFederationDelegate<T>
IFederationDelegate
implementation used by a standard client.
This may be extended or replaced using
AbstractClient.setDelegate(IFederationDelegate)
.Constructor and Description |
---|
DefaultClientDelegate(IBigdataClient<?> client,
T clientOrService) |
Modifier and Type | Method and Description |
---|---|
void |
didStart()
NOP
|
T |
getService()
Return the client or service.
|
Class |
getServiceIface()
Return the class or interface that is the most interesting facet of the
client and which will be used to identify this client in the performance
counters reported to the
ILoadBalancerService . |
String |
getServiceName()
Return a stable identifier for this client based on the name of the
implementation class, the hostname, and the hash code of the client
(readable and likely to be unique, but uniqueness is not guaranteed).
|
UUID |
getServiceUUID()
Returns a stable but randomly assigned
UUID . |
boolean |
isServiceReady()
Returns
true . |
AbstractHTTPD |
newHttpd(int httpdPort,
ICounterSetAccess access)
Create a new
AbstractHTTPD instance. |
void |
reattachDynamicCounters()
NOP.
|
void |
serviceJoin(IService service,
UUID serviceUUID)
NOP
|
void |
serviceLeave(UUID serviceUUID)
NOP
|
public DefaultClientDelegate(IBigdataClient<?> client, T clientOrService)
client
- The client (before it connects to the federation).clientOrService
- The client or service connected to the federation. This MAY be
null
but then getService()
will also
return null
.public T getService()
IFederationDelegate
getService
in interface IFederationDelegate<T>
public UUID getServiceUUID()
UUID
.getServiceUUID
in interface IFederationDelegate<T>
AbstractService.setServiceUUID(UUID)
public String getServiceName()
getServiceName
in interface IFederationDelegate<T>
public Class getServiceIface()
IFederationDelegate
ILoadBalancerService
.getServiceIface
in interface IFederationDelegate<T>
null
.public void reattachDynamicCounters()
reattachDynamicCounters
in interface IFederationDelegate<T>
public boolean isServiceReady()
true
.isServiceReady
in interface IFederationDelegate<T>
public void didStart()
didStart
in interface IFederationDelegate<T>
public void serviceJoin(IService service, UUID serviceUUID)
serviceJoin
in interface IFederationDelegate<T>
service
- The service.serviceUUID
- The service UUID
.public void serviceLeave(UUID serviceUUID)
serviceLeave
in interface IFederationDelegate<T>
serviceUUID
- The service UUID
.public AbstractHTTPD newHttpd(int httpdPort, ICounterSetAccess access) throws IOException
IFederationDelegate
AbstractHTTPD
instance.newHttpd
in interface IFederationDelegate<T>
access
- Used to materialize the CounterSet
that will be served
up.IOException
Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.