public abstract class GridRestProtocolAdapter extends Object implements GridRestProtocol
Modifier and Type | Field and Description |
---|---|
protected GridKernalContext |
ctx
Context.
|
protected InetAddress |
host
Host used by this protocol.
|
protected IgniteLogger |
log
Logger.
|
protected int |
port
Port used by this protocol.
|
protected String |
secretKey
Secret key.
|
Modifier | Constructor and Description |
---|---|
protected |
GridRestProtocolAdapter(GridKernalContext ctx) |
Modifier and Type | Method and Description |
---|---|
protected void |
assertParameter(boolean cond,
String condDesc) |
protected boolean |
authenticate(String tok)
Authenticates current request.
|
protected ConnectorConfiguration |
config() |
protected abstract String |
getAddressPropertyName()
Return node attribute name to store used address.
|
protected abstract String |
getHostNamePropertyName()
Return node attribute name to store used host name.
|
protected abstract String |
getPortPropertyName()
Return node attribute name to store used port number.
|
Collection<IgniteBiTuple<String,Object>> |
getProperties()
Returns protocol properties for setting node attributes.
|
void |
onKernalStart()
Grid start callback.
|
protected String |
startInfo() |
protected String |
stopInfo() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
name, start, stop
protected final GridKernalContext ctx
protected final IgniteLogger log
protected final String secretKey
protected InetAddress host
protected int port
protected GridRestProtocolAdapter(GridKernalContext ctx)
ctx
- Context.protected boolean authenticate(@Nullable String tok)
Token consists of 2 parts separated by semicolon:
tok
- Authentication token.true
if authentication info provided in request is correct.protected String startInfo()
protected String stopInfo()
protected final void assertParameter(boolean cond, String condDesc) throws IgniteCheckedException
cond
- Condition to check.condDesc
- Error message.IgniteCheckedException
- If check failed.protected ConnectorConfiguration config()
public Collection<IgniteBiTuple<String,Object>> getProperties()
getProperties
in interface GridRestProtocol
protected abstract String getAddressPropertyName()
protected abstract String getHostNamePropertyName()
protected abstract String getPortPropertyName()
public void onKernalStart()
onKernalStart
in interface GridRestProtocol
Follow @ApacheIgnite
Ignite Fabric : ver. 2.0.0 Release Date : April 30 2017