@GridSpiNoop @GridSpiMultipleInstancesSupport(value=true) public class GridNoopSecureSessionSpi extends GridSpiAdapter implements GridSecureSessionSpi, GridNoopSecureSessionSpiMBean
GridNoopSecureSessionSpi spi = new GridNoopSecureSessionSpi(); GridConfiguration cfg = new GridConfiguration(); // Override default SecureSession SPI. cfg.setSecureSessionSpi(spi); // Start grid. GridGain.start(cfg);
<bean id="grid.custom.cfg" class="org.gridgain.grid.GridConfiguration" singleton="true">
...
<property name="secureSessionSpi">
<bean class="org.gridgain.grid.spi.SecureSession.noop.GridNoopSecureSessionSpi"/>
</property>
...
</bean>
For information about Spring framework visit www.springframework.org
GridSecureSessionSpi| Constructor and Description |
|---|
GridNoopSecureSessionSpi() |
| Modifier and Type | Method and Description |
|---|---|
byte[] |
generateSessionToken(GridSecuritySubjectType subjType,
UUID subjId,
Object params)
Generates new session token.
|
void |
spiStart(String gridName)
This method is called to start SPI.
|
void |
spiStop()
This method is called to stop SPI.
|
boolean |
supported(GridSecuritySubjectType subjType)
Checks if given subject is supported by this SPI.
|
String |
toString() |
boolean |
validate(GridSecuritySubjectType subjType,
UUID subjId,
byte[] tok,
Object params)
Validates given session token.
|
assertParameter, checkConfigurationConsistency0, configInfo, createSpiAttributeName, getConsistentAttributeNames, getGridGainHome, getLocalNodeId, getName, getNodeAttributes, getSpiContext, getStartTimestamp, getStartTimestampFormatted, getUpTime, getUpTimeFormatted, injectables, onContextDestroyed, onContextDestroyed0, onContextInitialized, onContextInitialized0, registerMBean, setName, startInfo, startStopwatch, stopInfo, unregisterMBeanclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetName, getNodeAttributes, onContextDestroyed, onContextInitializedgetGridGainHome, getLocalNodeId, getName, getStartTimestamp, getStartTimestampFormatted, getUpTime, getUpTimeFormattedpublic boolean supported(GridSecuritySubjectType subjType)
supported in interface GridSecureSessionSpisubjType - Subject type.True if subject type is supported, false otherwise.public boolean validate(GridSecuritySubjectType subjType, UUID subjId, @Nullable byte[] tok, @Nullable Object params) throws GridSpiException
validate in interface GridSecureSessionSpisubjType - Subject type.subjId - Unique subject ID such as local or remote node ID, client ID, etc.tok - Token to validate.params - Additional implementation-specific parameters.True if session token is valid, false otherwise.GridSpiException - If validation resulted in system error. Note that
bad credentials should not cause this exception.public byte[] generateSessionToken(GridSecuritySubjectType subjType, UUID subjId, @Nullable Object params)
generateSessionToken in interface GridSecureSessionSpisubjType - Subject type.subjId - Unique subject ID such as local or remote node ID, client ID, etc.params - Additional implementation-specific parameters.public void spiStart(String gridName) throws GridSpiException
spiStart in interface GridSpigridName - Name of grid instance this SPI is being started for
(null for default grid).GridSpiException - Throws in case of any error during SPI start.public void spiStop()
throws GridSpiException
Note that this method can be called at any point including during recovery of failed start. It should make no assumptions on what state SPI will be in when this method is called.
spiStop in interface GridSpiGridSpiException - Thrown in case of any error during SPI stop.Copyright © 2014. All rights reserved.