Examples of addListener()


Examples of com.peterhi.obsolete.MultithreadedRudpLocalEndpoint.addListener()

public class MultithreadedServer {

  public static void main(String[] args) throws Exception {
    RudpLocalEndpoint localEndpoint = new MultithreadedRudpLocalEndpoint(22222);
    localEndpoint.addListener(new RudpDataListener() {
      @Override
      public void received(RudpDataEvent event) {
        try {
          System.out.println("Received " + (event.isReliable() ? "reliable" : "unreliable") +
            " data of " + event.getInputStream().available() + " bytes");
View Full Code Here

Examples of com.peterhi.obsolete.RudpLocalEndpoint.addListener()

public class MultithreadedServer {

  public static void main(String[] args) throws Exception {
    RudpLocalEndpoint localEndpoint = new MultithreadedRudpLocalEndpoint(22222);
    localEndpoint.addListener(new RudpDataListener() {
      @Override
      public void received(RudpDataEvent event) {
        try {
          System.out.println("Received " + (event.isReliable() ? "reliable" : "unreliable") +
            " data of " + event.getInputStream().available() + " bytes");
View Full Code Here

Examples of com.peterhi.working.EndpointImpl.addListener()

public class Server {

  public static void main(String[] args) throws Exception {
    EndpointImpl endpoint = new EndpointImpl(new DatagramSocket(22222));
    endpoint.addListener(new Listener() {
      @Override
      public void update(Event event) {
        try {
          InputStream stream = event.getInputStream();
         
View Full Code Here

Examples of com.pi4j.io.gpio.GpioPinDigitalInput.addListener()

       
          
       
       
            // create and register gpio pin listener
        myButton3.addListener(new GpioPinListenerDigital() {

            @Override
            public void handleGpioPinDigitalStateChangeEvent(GpioPinDigitalStateChangeEvent event) {

          if(event.getState() == PinState.LOW)           
View Full Code Here

Examples of com.pi4j.io.serial.Serial.addListener()

        // create an instance of the serial communications class
        final Serial serial = SerialFactory.createInstance();

        // create and register the serial data listener
        serial.addListener(new SerialDataListener() {
            @Override
            public void dataReceived(SerialDataEvent event) {
                // print out the data received to the console
                String v = event.getData();
                //System.out.print(v);
View Full Code Here

Examples of com.pugh.sockso.gui.action.RequestLogExport.addListener()

    private void createComponents() {
       
        exportRequestLogFormats = new JComboBox( DBExporter.Format.values() );
       
        RequestLogExport exportAction = new RequestLogExport( parent, db, locale, exportRequestLogFormats );
        exportAction.addListener( this );
       
        exportRequestLogButton = new JButton(
            locale.getString("gui.label.export"),
            new ImageIcon( r.getImage("icons/16x16/export.png") )
        );
View Full Code Here

Examples of com.puppycrawl.tools.checkstyle.Checker.addListener()

        AuditListener listener = request.getListener();

        if ( listener != null )
        {
            checker.addListener( listener );
        }

        if ( request.isConsoleOutput() )
        {
            checker.addListener( request.getConsoleListener() );
View Full Code Here

Examples of com.sirenian.hellbound.util.ListenerSet.addListener()

    }
   
    public void shouldAddListenersToTheGlyphsThatItCreates() {
        ListenerSet listenerSet = new ListenerSet();
        Mock listener = mock(GlyphListener.class);
        listenerSet.addListener((Listener) listener);
       
        PseudoRandomGlyphFactory factory = new PseudoRandomGlyphFactory(42, 7, 13);
        LivingGlyph glyph = factory.nextGlyph(CollisionDetector.NULL, listenerSet);
        Junk junk = factory.createJunk(listenerSet);
       
View Full Code Here

Examples of com.sonyericsson.hudson.plugins.gerrit.trigger.GerritServer.addListener()

     * Add this patches listener to the GerritServer object to which it is associated.
     */
    private void addThisAsListener() {
        GerritServer server = PluginImpl.getInstance().getServer(serverName);
        if (server != null) {
            server.addListener(this);
        } else {
            logger.error("Could not find server {}", serverName);
        }
    }

View Full Code Here

Examples of com.sonyericsson.hudson.plugins.gerrit.trigger.events.ManualPatchsetCreated.addListener()

     */
    @Test
    public void shouldNotifyLifecycleListener() {
        GerritEventLifecycleListener lifecycleListenerMock = mock(GerritEventLifecycleListener.class);
        ManualPatchsetCreated manualPatchset = Setup.createManualPatchsetCreated();
        manualPatchset.addListener(lifecycleListenerMock);

        gerritHandler.notifyListeners(manualPatchset);

        InOrder inOrder = inOrder(lifecycleListenerMock);
        inOrder.verify(lifecycleListenerMock).triggerScanStarting(manualPatchset);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.