/*
* The MIT License
*
- * Copyright 2015 eddie.
+ * Copyright 2015 Eddie Berrisford-Lynch <dev@fun2be.me>.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
import java.util.EventObject;
/**
- *
- * @author eddie
+ * Dispatched when new (TCP) stream connections are established.
+ *
+ * @author Eddie Berrisford-Lynch <dev@fun2be.me>
*/
public class ConnectionEstablishedEvent extends EventObject {
-
+ /**
+ * the network stream that has been created.
+ */
private final NetworkStream _stream;
+ /**
+ * Create event object wrapping the new stream.
+ *
+ * @param source the object dispatching the event
+ * @param stream the new stream
+ */
public ConnectionEstablishedEvent(Object source, NetworkStream stream) {
super(source);
_stream = stream;
}
+ /**
+ * Get the stream attached to the event.
+ *
+ * @return the stream
+ */
public NetworkStream getStream() {
return _stream;
}
/*
* The MIT License
*
- * Copyright 2015 eddie.
+ * Copyright 2015 Eddie Berrisford-Lynch <dev@fun2be.me>.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
package uk.ac.ntu.n0521366.wsyd.libs.net;
/**
- *
- * @author eddie
+ * Implemented by classes that want to receive ConnectionEstablished events.
+ * @author Eddie Berrisford-Lynch <dev@fun2be.me>
*/
public interface ConnectionEstablishedEventListener {
public void connectionEstablished(ConnectionEstablishedEvent event);