-
-
Notifications
You must be signed in to change notification settings - Fork 423
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
14 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,57 +1,19 @@ | ||
'use strict'; | ||
const util = require('util'); | ||
const EventEmitter = require('events'); | ||
|
||
/** | ||
* [Adapter description] | ||
*/ | ||
function Adapter(){ | ||
EventEmitter.call(this); | ||
return this; | ||
class NotImplementedException extends Error { | ||
// Nothing. | ||
} | ||
|
||
util.inherits(Adapter, EventEmitter); | ||
|
||
/** | ||
* [extends description] | ||
* @param {[type]} ctor [description] | ||
* @return {[type]} [description] | ||
*/ | ||
Adapter.extends = function(ctor){ | ||
// console.log(ctor); | ||
util.inherits(ctor, Adapter); | ||
return ctor; | ||
}; | ||
|
||
/** | ||
* [open description] | ||
* @return {[type]} [description] | ||
*/ | ||
Adapter.prototype.open = function () { | ||
throw new Error('NotImplementedException'); | ||
return this; | ||
}; | ||
|
||
/** | ||
* [close description] | ||
* @return {[type]} [description] | ||
*/ | ||
Adapter.prototype.close = function () { | ||
throw new Error('NotImplementedException'); | ||
return this; | ||
}; | ||
|
||
/** | ||
* [write description] | ||
* @return {[type]} [description] | ||
*/ | ||
Adapter.prototype.write = function () { | ||
throw new Error('NotImplementedException'); | ||
return this; | ||
}; | ||
|
||
/** | ||
* [exports description] | ||
* @type {[type]} | ||
*/ | ||
module.exports = Adapter; | ||
class Adapter extends EventEmitter { | ||
open() { | ||
throw new NotImplementedException(); | ||
} | ||
write() { | ||
throw new NotImplementedException(); | ||
} | ||
close() { | ||
throw new NotImplementedException(); | ||
} | ||
} | ||
module.exports = Adapter; |