Moved files + added interface + generic socket file listener
[core.git] / inc / main / classes / listener / class_
index 5d3309f57c42e502a94c4345e577a1b98412dbfa..d09db71d6875060a0304a470513ded8806f11496 100644 (file)
@@ -35,16 +35,12 @@ class ???Listener extends BaseListener implements Listenable {
        /**
         * Creates an instance of this class
         *
-        * @param       $nodeInstance           A NodeHelper instance
         * @return      $listenerInstance       An instance a prepared listener class
         */
-       public final static function create???Listener (NodeHelper $nodeInstance) {
+       public final static function create???Listener () {
                // Get new instance
                $listenerInstance = new ???Listener();
 
-               // Set the application instance
-               $listenerInstance->setNodeInstance($nodeInstance);
-
                // Return the prepared instance
                return $listenerInstance;
        }
@@ -68,6 +64,62 @@ class ???Listener extends BaseListener implements Listenable {
        public function doListen() {
                $this->partialStub('Need to implement this method.');
        }
+
+       /**
+        * Checks whether the listener would accept the given package data array
+        *
+        * @param       $packageData    Raw package data
+        * @return      $accepts                Whether this listener does accept
+        */
+       public function ifListenerAcceptsPackageData (array $packageData) {
+               $this->partialStub('Need to implement this method.') {
+       }
+
+       /**
+        * Monitors incoming raw data from the handler and transfers it to the
+        * given receiver instance.
+        *
+        * @return      void
+        */
+       public function monitorIncomingRawData () {
+               $this->partialStub('Need to implement this method.') {
+       }
+
+       /**
+        * Getter for listen address
+        *
+        * @return      $listenAddress  The address this listener should listen on
+        */
+       public function getListenAddress () {
+               $this->partialStub('Need to implement this method.') {
+       }
+
+       /**
+        * Getter for listen port
+        *
+        * @return      $listenPort             The port this listener should listen on
+        */
+       public function getListenPort () {
+               $this->partialStub('Need to implement this method.') {
+       }
+
+       /**
+        * Getter for connection type
+        *
+        * @return      $connectionType         Connection type for this listener
+        */
+       public function getConnectionType () {
+               $this->partialStub('Need to implement this method.') {
+       }
+
+       /**
+        * Getter for peer pool instance
+        *
+        * @return      $poolInstance   The peer pool instance we shall set
+        */
+       public function getPoolInstance () {
+               $this->partialStub('Need to implement this method.') {
+       }
 }
 
 // [EOF]