All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.highway2urhell.service.impl.RmiService Maven / Gradle / Ivy

There is a newer version: 1.0.5
Show newest version
package com.highway2urhell.service.impl;


import com.highway2urhell.domain.EntryPathData;
import com.highway2urhell.service.AbstractLeechService;

import java.rmi.registry.LocateRegistry;
import java.rmi.registry.Registry;
import java.util.List;

public class RmiService extends AbstractLeechService {

    public static final String FRAMEWORK_NAME = "RMI";

    public RmiService() {
        super(FRAMEWORK_NAME);
    }

    @Override
    protected void gatherData(List incoming) {
        try {
            Registry reg = LocateRegistry.getRegistry();
            if(reg!=null){
                for (String name : reg.list()){
                    EntryPathData e = new EntryPathData();
                    e.setClassName(reg.lookup(name).getClass().getName());
                    e.setMethodName(name);
                    e.setUri(name);
                    e.setAudit(false);
                    addEntryPath(e);
                }
            }
        }catch (Exception e){
            LOGGER.info(" No locate registry "+e);
        }


    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy