I use Ubuntu’s Uncomplicated firewall because it is available on Ubuntu and it's very simple.
if ufw is not installed by default be sure to install it first.
import android.content.Intent; | |
import android.os.Bundle; | |
import android.support.v7.app.AppCompatActivity; | |
import org.hamcrest.Description; | |
import org.hamcrest.Matcher; | |
import org.hamcrest.TypeSafeMatcher; | |
import static android.support.test.InstrumentationRegistry.getInstrumentation; | |
import static org.hamcrest.MatcherAssert.assertThat; |
@Singleton | |
@javax.ws.rs.ext.Provider | |
public class NewRelicTimedApplicationListener implements ApplicationEventListener { | |
private Map<Method,String> methodMap = new HashMap<>(); | |
@Override | |
public void onEvent(ApplicationEvent event) { | |
if (event.getType() == ApplicationEvent.Type.INITIALIZATION_APP_FINISHED) { | |
for (Resource resource : event.getResourceModel().getResources()) { |