Package org.jdrupes.vmoperator.vmaccess
Class VmAccess
java.lang.Object
org.jgrapes.core.internal.ComponentVertex
org.jgrapes.core.Component
org.jgrapes.webconsole.base.AbstractConlet<VmAccess.ResourceModel>
org.jgrapes.webconsole.base.freemarker.FreeMarkerConlet<VmAccess.ResourceModel>
org.jdrupes.vmoperator.vmaccess.VmAccess
- All Implemented Interfaces:
- Iterable<ComponentType>,- Channel,- ComponentType,- Eligible,- Manager
public class VmAccess
extends org.jgrapes.webconsole.base.freemarker.FreeMarkerConlet<VmAccess.ResourceModel>
The Class 
VmAccess.The component supports the following configuration properties:
- displayResource: a map with the following entries:- preferredIpVersion:- ipv4or- ipv6(default:- ipv4). Determines the IP addresses uses in the generated connection file.
 
- deleteConnectionFile:- trueor- false(default:- true). If- true, the downloaded connection file will be deleted by the remote viewer when opened.
- syncPreviewsFor: a list objects with either property- useror- roleand the associated name (default:- []). The remote viewer will synchronize the previews for the specified users and roles.
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic classThe Class AccessModel.static classThe periodically generated update event.Nested classes/interfaces inherited from class org.jgrapes.webconsole.base.AbstractConletorg.jgrapes.webconsole.base.AbstractConlet.ConletTrackingInfoNested classes/interfaces inherited from interface org.jgrapes.core.ChannelChannel.Default
- 
Field SummaryFields inherited from class org.jgrapes.webconsole.base.AbstractConletTYPE_INSTANCE_SEPARATOR
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionprotected Optional<VmAccess.ResourceModel> createNewState(org.jgrapes.webconsole.base.events.AddConletRequest event, org.jgrapes.webconsole.base.ConsoleConnection connection, String conletId) protected Optional<VmAccess.ResourceModel> createStateRepresentation(Event<?> event, org.jgrapes.webconsole.base.ConsoleConnection connection, String conletId) protected voiddoConletDeleted(org.jgrapes.webconsole.base.events.ConletDeleted event, org.jgrapes.webconsole.base.ConsoleConnection channel, String conletId, VmAccess.ResourceModel conletState) protected Set<org.jgrapes.webconsole.base.Conlet.RenderMode> doRenderConlet(org.jgrapes.webconsole.base.events.RenderConletRequestBase<?> event, org.jgrapes.webconsole.base.ConsoleConnection channel, String conletId, VmAccess.ResourceModel model) protected booleandoSetLocale(org.jgrapes.webconsole.base.events.SetLocale event, org.jgrapes.webconsole.base.ConsoleConnection channel, String conletId) protected voiddoUpdateConletState(org.jgrapes.webconsole.base.events.NotifyConletModel event, org.jgrapes.webconsole.base.ConsoleConnection channel, VmAccess.ResourceModel model) voidConfigure the component.voidonConsoleConfigured(org.jgrapes.webconsole.base.events.ConsoleConfigured event, org.jgrapes.webconsole.base.ConsoleConnection connection) On console configured.voidonConsolePrepared(org.jgrapes.webconsole.base.events.ConsolePrepared event, org.jgrapes.webconsole.base.ConsoleConnection connection) On console prepared.voidonConsoleReady(org.jgrapes.webconsole.base.events.ConsoleReady event, org.jgrapes.webconsole.base.ConsoleConnection channel) OnConsoleReady, fire theAddConletType.voidOn start.voidonVmPoolChanged(VmPoolChanged event) On vm pool changed.voidonVmResourceChanged(VmResourceChanged event, VmChannel channel) Track the VM definitions and update conlets.protected Optional<VmAccess.ResourceModel> recreateState(Event<?> event, org.jgrapes.webconsole.base.ConsoleConnection channel, String conletId) Methods inherited from class org.jgrapes.webconsole.base.freemarker.FreeMarkerConletdoGetResource, fmConletModel, fmModel, fmModel, fmSessionModel, fmTypeModel, freemarkerConfig, processTemplate, processTemplateMethods inherited from class org.jgrapes.webconsole.base.AbstractConletafterOnClosed, conletIds, conletIdsByConsoleConnection, conletViews, doRemoveConletType, generateInstanceId, l10nBundles, localizations, onAddConletRequest, onClosed, onConletDeleted, onConletResourceRequest, onDetached, onNotifyConletModel, onRenderConletRequest, onSetLocale, putInSession, readContent, readContent, removeState, resourceBundle, setPeriodicRefresh, stateFromSession, statesFromSession, supportedLocales, trackConlet, trackedConnections, type, typeFromIdMethods inherited from class org.jgrapes.core.Componentchannel, component, defaultCriterion, isEligibleFor, setNameMethods inherited from class org.jgrapes.core.internal.ComponentVertexactiveEventPipeline, addHandler, attach, channelReplacements, children, componentPath, componentVertex, detach, fire, initComponentsHandlers, iterator, name, newEventPipeline, newEventPipeline, parent, registerAsGenerator, root, toString, unregisterAsGeneratorMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.IterableforEach, spliterator
- 
Constructor Details- 
VmAccessCreates a new component with its channel set to the given channel.- Parameters:
- componentChannel- the channel that the component’s handlers listen on by default and that- Manager.fire(Event, Channel...)sends the event to
 
 
- 
- 
Method Details- 
onStartOn start.- Parameters:
- event- the event
 
- 
onConfigurationUpdateConfigure the component.- Parameters:
- event- the event
 
- 
onConsoleReady@Handler public void onConsoleReady(org.jgrapes.webconsole.base.events.ConsoleReady event, org.jgrapes.webconsole.base.ConsoleConnection channel) throws TemplateNotFoundException, MalformedTemplateNameException, ParseException, IOException OnConsoleReady, fire theAddConletType.- Parameters:
- event- the event
- channel- the channel
- Throws:
- TemplateNotFoundException- the template not found exception
- MalformedTemplateNameException- the malformed template name exception
- ParseException- the parse exception
- IOException- Signals that an I/O exception has occurred.
 
- 
onConsoleConfigured@Handler public void onConsoleConfigured(org.jgrapes.webconsole.base.events.ConsoleConfigured event, org.jgrapes.webconsole.base.ConsoleConnection connection) throws InterruptedException, IOException On console configured.- Parameters:
- event- the event
- connection- the console connection
- Throws:
- InterruptedException- the interrupted exception
- IOException
 
- 
onConsolePrepared@Handler public void onConsolePrepared(org.jgrapes.webconsole.base.events.ConsolePrepared event, org.jgrapes.webconsole.base.ConsoleConnection connection) On console prepared.- Parameters:
- event- the event
- connection- the connection
 
- 
createNewStateprotected Optional<VmAccess.ResourceModel> createNewState(org.jgrapes.webconsole.base.events.AddConletRequest event, org.jgrapes.webconsole.base.ConsoleConnection connection, String conletId) throws Exception - Overrides:
- createNewStatein class- org.jgrapes.webconsole.base.AbstractConlet<VmAccess.ResourceModel>
- Throws:
- Exception
 
- 
createStateRepresentationprotected Optional<VmAccess.ResourceModel> createStateRepresentation(Event<?> event, org.jgrapes.webconsole.base.ConsoleConnection connection, String conletId) throws Exception - Overrides:
- createStateRepresentationin class- org.jgrapes.webconsole.base.AbstractConlet<VmAccess.ResourceModel>
- Throws:
- Exception
 
- 
recreateStateprotected Optional<VmAccess.ResourceModel> recreateState(Event<?> event, org.jgrapes.webconsole.base.ConsoleConnection channel, String conletId) throws Exception - Overrides:
- recreateStatein class- org.jgrapes.webconsole.base.AbstractConlet<VmAccess.ResourceModel>
- Throws:
- Exception
 
- 
doRenderConletprotected Set<org.jgrapes.webconsole.base.Conlet.RenderMode> doRenderConlet(org.jgrapes.webconsole.base.events.RenderConletRequestBase<?> event, org.jgrapes.webconsole.base.ConsoleConnection channel, String conletId, VmAccess.ResourceModel model) throws Exception - Specified by:
- doRenderConletin class- org.jgrapes.webconsole.base.AbstractConlet<VmAccess.ResourceModel>
- Throws:
- Exception
 
- 
doConletDeletedprotected void doConletDeleted(org.jgrapes.webconsole.base.events.ConletDeleted event, org.jgrapes.webconsole.base.ConsoleConnection channel, String conletId, VmAccess.ResourceModel conletState) throws Exception - Overrides:
- doConletDeletedin class- org.jgrapes.webconsole.base.AbstractConlet<VmAccess.ResourceModel>
- Throws:
- Exception
 
- 
onVmResourceChanged@Handler(namedChannels="manager") public void onVmResourceChanged(VmResourceChanged event, VmChannel channel) throws IOException, InterruptedException Track the VM definitions and update conlets.- Parameters:
- event- the event
- channel- the channel
- Throws:
- IOException
- InterruptedException
 
- 
onVmPoolChanged@Handler(namedChannels="manager") public void onVmPoolChanged(VmPoolChanged event) throws InterruptedException On vm pool changed.- Parameters:
- event- the event
- Throws:
- InterruptedException- the interrupted exception
 
- 
doUpdateConletStateprotected void doUpdateConletState(org.jgrapes.webconsole.base.events.NotifyConletModel event, org.jgrapes.webconsole.base.ConsoleConnection channel, VmAccess.ResourceModel model) throws Exception - Overrides:
- doUpdateConletStatein class- org.jgrapes.webconsole.base.AbstractConlet<VmAccess.ResourceModel>
- Throws:
- Exception
 
- 
doSetLocaleprotected boolean doSetLocale(org.jgrapes.webconsole.base.events.SetLocale event, org.jgrapes.webconsole.base.ConsoleConnection channel, String conletId) throws Exception - Overrides:
- doSetLocalein class- org.jgrapes.webconsole.base.AbstractConlet<VmAccess.ResourceModel>
- Throws:
- Exception
 
 
-