newsession.setGlobalSocketTimeout ( this.session.getGlobalSocketTimeout () ); newsession.useSessionSecurity ( this.session.isSessionSecurityEnabled () ); newsession.useNTLMv2 ( this.session.isNTLMv2Enabled () );
@Override public void afterDisconnect(SlaveComputer computer, TaskListener listener) { try { JIDefaultAuthInfoImpl auth = createAuth(); JISession session = JISession.createSession(auth); session.setGlobalSocketTimeout(60000); SWbemServices services = WMI.connect(session, computer.getName()); Win32Service slaveService = services.getService("hudsonslave"); if(slaveService!=null) { listener.getLogger().println(Messages.ManagedWindowsServiceLauncher_StoppingService()); slaveService.StopService(); } } catch (UnknownHostException e) { e.printStackTrace(listener.error(e.getMessage())); } catch (JIException e) { e.printStackTrace(listener.error(e.getMessage())); } }
@Override public void afterDisconnect(SlaveComputer computer, TaskListener listener) { try { JIDefaultAuthInfoImpl auth = createAuth(); JISession session = JISession.createSession(auth); session.setGlobalSocketTimeout(60000); SWbemServices services = WMI.connect(session, computer.getName()); Win32Service slaveService = services.getService("hudsonslave"); if(slaveService!=null) { listener.getLogger().println(Messages.ManagedWindowsServiceLauncher_StoppingService()); slaveService.StopService(); } } catch (UnknownHostException e) { e.printStackTrace(listener.error(e.getMessage())); } catch (JIException e) { e.printStackTrace(listener.error(e.getMessage())); } }
newsession.setGlobalSocketTimeout(session.getGlobalSocketTimeout()); newsession.useSessionSecurity(session.isSessionSecurityEnabled()); JIComServer comServer = new JIComServer(newsession,comObjectImpl.internal_getInterfacePointer(),null);
newsession.setGlobalSocketTimeout(session.getGlobalSocketTimeout()); newsession.useSessionSecurity(session.isSessionSecurityEnabled()); newsession.useNTLMv2(session.isNTLMv2Enabled());
public MSWMI(String address, String[] args) throws JIException, UnknownHostException { this.address = address; session = JISession.createSession(args[1],args[2],args[3]); session.useSessionSecurity(true); session.setGlobalSocketTimeout(5000); comStub = new JIComServer(JIProgId.valueOf("WbemScripting.SWbemLocator"),address,session); IJIComObject unknown = comStub.createInstance(); comObject = (IJIComObject)unknown.queryInterface("76A6415B-CB41-11d1-8B02-00600806D9B6");//ISWbemLocator //This will obtain the dispatch interface dispatch = (IJIDispatch)JIObjectFactory.narrowObject(comObject.queryInterface(IJIDispatch.IID)); }
public MSWMI ( final String address, final String[] args ) throws JIException, UnknownHostException { this.address = address; this.session = JISession.createSession ( args[1], args[2], args[3] ); this.session.useSessionSecurity ( true ); this.session.setGlobalSocketTimeout ( 5000 ); this.comStub = new JIComServer ( JIProgId.valueOf ( "WbemScripting.SWbemLocator" ), address, this.session ); final IJIComObject unknown = this.comStub.createInstance (); this.comObject = unknown.queryInterface ( "76A6415B-CB41-11d1-8B02-00600806D9B6" );//ISWbemLocator //This will obtain the dispatch interface this.dispatch = (IJIDispatch)JIObjectFactory.narrowObject ( this.comObject.queryInterface ( IJIDispatch.IID ) ); }
public MSWMI(String address, String[] args) throws JIException, UnknownHostException { this.address = address; session = JISession.createSession(args[1],args[2],args[3]); session.useSessionSecurity(true); session.setGlobalSocketTimeout(5000); comStub = new JIComServer(JIProgId.valueOf("WbemScripting.SWbemLocator"),address,session); IJIComObject unknown = comStub.createInstance(); comObject = (IJIComObject)unknown.queryInterface("76A6415B-CB41-11d1-8B02-00600806D9B6");//ISWbemLocator //This will obtain the dispatch interface dispatch = (IJIDispatch)JIObjectFactory.narrowObject(comObject.queryInterface(IJIDispatch.IID)); }
session.setGlobalSocketTimeout(60000); SWbemServices services = WMI.connect(session, name);
session.setGlobalSocketTimeout(60000); SWbemServices services = WMI.connect(session, name);
newsession.setGlobalSocketTimeout(session.getGlobalSocketTimeout()); newsession.useSessionSecurity(session.isSessionSecurityEnabled()); JIComServer comServer = new JIComServer(newsession,ptr,null);
newsession.setGlobalSocketTimeout(session.getGlobalSocketTimeout()); newsession.useSessionSecurity(session.isSessionSecurityEnabled()); newsession.useNTLMv2(session.isNTLMv2Enabled());
this.session.setGlobalSocketTimeout ( (int)this.globalSocketTimeout ); this.session.setGlobalSocketTimeout ( (int)this.globalSocketTimeout );
newsession.setGlobalSocketTimeout ( session.getGlobalSocketTimeout () ); newsession.useSessionSecurity ( session.isSessionSecurityEnabled () ); newsession.useNTLMv2 ( session.isNTLMv2Enabled () );
m_Session.setGlobalSocketTimeout(5000);
m_Session.setGlobalSocketTimeout(5000);