Revision: 0416dec9b8e2
Author: Jean Deruelle <[email protected]>
Date: Tue Jun 5 11:34:58 2012
Log: migrating pom to release to oss.sonatype.org
http://code.google.com/p/mediaserver/source/detail?r=0416dec9b8e2
Added:
/hardware/dahdi/java/src/main/java/org/mobicents/media/hardware/dahdi/Channel.java
/hardware/dahdi/java/src/main/java/org/mobicents/media/hardware/dahdi/Selector.java
/hardware/dahdi/java/src/main/java/org/mobicents/media/hardware/dahdi/SelectorKeyImpl.java
Deleted:
/hardware/dahdi/java/src/main/java/org/mobicents/ss7/hardware/dahdi/Channel.java
/hardware/dahdi/java/src/main/java/org/mobicents/ss7/hardware/dahdi/Selector.java
/hardware/dahdi/java/src/main/java/org/mobicents/ss7/hardware/dahdi/SelectorKeyImpl.java
Modified:
/.gitignore
/hardware/dahdi/java/pom.xml
/hardware/dahdi/native/pom.xml
/hardware/pom.xml
/pom.xml
=======================================
--- /dev/null
+++
/hardware/dahdi/java/src/main/java/org/mobicents/media/hardware/dahdi/Channel.java
Tue Jun 5 11:34:58 2012
@@ -0,0 +1,231 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2011, Red Hat, Inc. and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.mobicents.media.hardware.dahdi;
+
+import java.io.IOException;
+import java.nio.ByteBuffer;
+
+import org.mobicents.protocols.stream.api.SelectorKey;
+import org.mobicents.protocols.stream.api.Stream;
+import org.mobicents.protocols.stream.api.SelectorProvider;
+import org.mobicents.protocols.stream.api.StreamSelector;
+
+/**
+ * Implementation for {@link org.mobicents.protocols.ss7.mtp.Mtp1}. Opens
the
+ * channel (JNI) and works with underlying dahdi link
+ *
+ * @author kulikov
+ * @author baranowb
+ * @author amit bhayani
+ */
+public class Channel implements Stream {
+
+ private final static String LIB_NAME = "mobicents-dahdi-linux";
+
+ static {
+ try {
+ System.loadLibrary(LIB_NAME);
+ System.out.println("Loaded library mobicents-dahdi-linux");
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+
+ private int channelID;
+ private int code;
+ private String linkName;
+ private int ioBufferSize = 32; // lets default to 32, it seems optimal.
+ protected int fd;
+
+ private Object link;
+
+ protected SelectorKey selectorKey;
+
+ public Channel() {
+ }
+
+ public int getChannelID() {
+ return channelID;
+ }
+
+ public void setChannelID(int channelID) {
+ this.channelID = channelID;
+ }
+
+ public void setCode(int code) {
+ this.code = code;
+ }
+
+ public int getCode() {
+ return code;
+ }
+
+ public void setLinkName(String linkName) {
+ this.linkName = linkName;
+ }
+
+ public String getLinkName() {
+ return linkName;
+ }
+
+ public int getIOBufferSize() {
+ return ioBufferSize;
+ }
+
+ public void setIOBufferSize(int bufferSize) {
+ this.ioBufferSize = bufferSize;
+ }
+
+ public void open() {
+ int zapid = channelID;
+ fd = openChannel(zapid, ioBufferSize);
+ }
+
+ /**
+ * Opens this channel and prepares it for reading.
+ *
+ * @param id -
+ * id of zap device, its appended at the end of path, for
+ * instance: /dev/dahdi/${id}
+ * @param bufferSize -
+ * size of buffer to be used for I/O ops.
+ */
+ public native int openChannel(int id, int bufferSize);
+
+ /**
+ * Reads data from this pipe.
+ *
+ * @param buffer
+ * the byte buffer to read data.
+ * @return the number of bytes actualy read.
+ */
+ public int read(byte[] buffer) throws IOException {
+ int result=readData(fd, buffer,ioBufferSize);
+ if(result==-1)
+ {
+ doUnregister(fd);
+ close();
+ int zapid = channelID;
+ fd = openChannel(zapid, ioBufferSize);
+ doRegister(fd);
+
+ return 0;
+ }
+
+ return result;
+ }
+
+ public native int readData(int fd, byte[] buffer, int bufferSize);
+
+ /**
+ * Writes specified data to the pipe.
+ *
+ * @param buffer
+ * the buffer with data to write
+ * @param len
+ * the length of the buffer.
+ */
+ public int write(byte[] buffer) throws IOException {
+ writeData(fd, buffer, buffer.length);
+ return buffer.length; // ?
+ }
+
+ public native void writeData(int fd, byte[] buffer, int len);
+
+ /**
+ * Registers pipe for polling.
+ *
+ * @param fd
+ * the file descriptor.
+ */
+ public native void doRegister(int fd);
+
+ /**
+ * Unregisters pipe from polling.
+ *
+ * @param fd
+ * the file descriptor.
+ */
+ public native void doUnregister(int fd);
+
+ public void close() {
+ closeChannel(fd);
+ }
+
+ /**
+ * Closes this pipe.
+ */
+ public native void closeChannel(int fd);
+
+ @Override
+ public String toString() {
+ return Integer.toString(channelID);
+ }
+
+ public void setLink(Object link) {
+ this.link = link;
+ }
+
+ public Object getLink() {
+ return this.link;
+ }
+
+ protected void doRegister(StreamSelector selector) {
+ doRegister(fd);
+ }
+
+ protected void doUnregister(StreamSelector selector) {
+ doUnregister(fd);
+ }
+
+ public boolean isReadable() {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ public boolean isWriteable() {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ public SelectorProvider provider() {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ public SelectorKey register(StreamSelector selector) throws
IOException {
+ return ((Selector) selector).register(this);
+ }
+
+ public void write(byte[] data, int len) throws IOException {
+ this.writeData(fd, data, len);
+ }
+
+ public int read(ByteBuffer arg0) throws IOException {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ public int write(ByteBuffer arg0) throws IOException {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+}
=======================================
--- /dev/null
+++
/hardware/dahdi/java/src/main/java/org/mobicents/media/hardware/dahdi/Selector.java
Tue Jun 5 11:34:58 2012
@@ -0,0 +1,171 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2011, Red Hat, Inc. and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.mobicents.media.hardware.dahdi;
+
+import java.io.IOException;
+
+import javolution.util.FastList;
+
+import org.apache.log4j.Logger;
+import org.mobicents.protocols.stream.api.SelectorKey;
+import org.mobicents.protocols.stream.api.Stream;
+import org.mobicents.protocols.stream.api.StreamSelector;
+
+/**
+ *
+ * @author amit bhayani
+ *
+ */
+public class Selector implements StreamSelector {
+
+ private final static String LIB_NAME = "mobicents-dahdi-linux";
+
+ public final static int READ = 0x01;
+ public final static int WRITE = 0x02;
+
+ /** array of selected file descriptors */
+ private int fds[] = new int[480];
+
+ /** array of registered channels */
+ private FastList<Channel> registered = new FastList<Channel>();
+
+ private int ops;
+
+ /** array of selected channels */
+ private FastList<SelectorKey> selected = new FastList<SelectorKey>();
+ private static Logger logger = Logger.getLogger(Selector.class);
+
+ static {
+ try {
+ System.loadLibrary(LIB_NAME);
+ System.out.println("Loaded library mobicents-dahdi-linux");
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+
+ public Selector() {
+
+ }
+
+ /**
+ * Register channel with this selector.
+ *
+ * @param channel
+ * the channel to register.
+ */
+ public SelectorKey register(Channel channel) {
+ // add channel instance to the collection
+ registered.add(channel);
+ // perform actual registration
+ logger.info("Registering file descriptor:" + ((Channel)
channel).fd);
+ doRegister(((Channel) channel).fd);
+
+ SelectorKeyImpl key = new SelectorKeyImpl(channel, this);
+ channel.selectorKey = key;
+ return key;
+ }
+
+ /**
+ * Unregister channel.
+ *
+ * @param channel
+ * the channel to unregister.
+ */
+ public void unregister(Channel channel) {
+ registered.remove(channel);
+ channel.selectorKey = null;
+ doUnregister(((Channel) channel).fd);
+ }
+
+ /**
+ * Registers pipe for polling.
+ *
+ * @param fd
+ * the file descriptor.
+ */
+ public native void doRegister(int fd);
+
+ /**
+ * Unregisters pipe from polling.
+ *
+ * @param fd
+ * the file descriptor.
+ */
+ public native void doUnregister(int fd);
+
+ /**
+ * Delegates select call to unix poll function.
+ *
+ * @param fds
+ * the list of file descriptors.
+ * @param key
+ * selection key.
+ * @return the number of selected channels.
+ */
+ public native int doPoll(int[] fds, int key, int timeout);
+
+ public FastList<SelectorKey> selectNow(int ops, int timeout)
+ throws IOException {
+ int count = doPoll(fds, ops, 20);
+ selected.clear();
+ for (int i = 0; i < count; i++) {
+ for (FastList.Node<Channel> n = registered.head(), end =
registered
+ .tail(); (n = n.getNext()) != end;) {
+ Channel channel = (Channel) n.getValue();
+ if (channel.fd == fds[i]) {
+ selected.add(channel.selectorKey);
+ }
+ }
+ }
+ return selected;
+ }
+
+ public void setOperation(int v) {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ public int getOperations() {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ public boolean isReadOperation() {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ public boolean isWriteOperation() {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ public boolean isClosed() {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ public void close() {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ public FastList<Stream> getRegisteredStreams() {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+}
=======================================
--- /dev/null
+++
/hardware/dahdi/java/src/main/java/org/mobicents/media/hardware/dahdi/SelectorKeyImpl.java
Tue Jun 5 11:34:58 2012
@@ -0,0 +1,86 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2011, Red Hat, Inc. and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+/*
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
+ */
+
+package org.mobicents.media.hardware.dahdi;
+
+import org.mobicents.protocols.stream.api.SelectorKey;
+import org.mobicents.protocols.stream.api.Stream;
+import org.mobicents.protocols.stream.api.StreamSelector;
+
+/**
+ *
+ * @author kulikov
+ */
+public class SelectorKeyImpl implements SelectorKey {
+
+ private boolean isValid;
+ private boolean isReadable;
+ private boolean isWritable;
+
+ private Channel channel;
+ private Selector selector;
+
+ private Object attachment;
+
+ protected SelectorKeyImpl(Channel channel, Selector selector) {
+ this.channel = channel;
+ this.selector = selector;
+ }
+
+ public boolean isValid() {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ public boolean isReadable() {
+ return isReadable;
+ }
+
+ public boolean isWriteable() {
+ return isWritable;
+ }
+
+ public Stream getStream() {
+ return channel;
+ }
+
+ public StreamSelector getStreamSelector() {
+ return selector;
+ }
+
+ public void cancel() {
+ selector.unregister(channel);
+ }
+
+ public void attach(Object obj) {
+ this.attachment = obj;
+ }
+
+ public Object attachment() {
+ return this.attachment;
+ }
+
+}
=======================================
---
/hardware/dahdi/java/src/main/java/org/mobicents/ss7/hardware/dahdi/Channel.java
Mon May 28 08:12:44 2012
+++ /dev/null
@@ -1,231 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2011, Red Hat, Inc. and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-
-package org.mobicents.media.hardware.dahdi;
-
-import java.io.IOException;
-import java.nio.ByteBuffer;
-
-import org.mobicents.protocols.stream.api.SelectorKey;
-import org.mobicents.protocols.stream.api.Stream;
-import org.mobicents.protocols.stream.api.SelectorProvider;
-import org.mobicents.protocols.stream.api.StreamSelector;
-
-/**
- * Implementation for {@link org.mobicents.protocols.ss7.mtp.Mtp1}. Opens
the
- * channel (JNI) and works with underlying dahdi link
- *
- * @author kulikov
- * @author baranowb
- * @author amit bhayani
- */
-public class Channel implements Stream {
-
- private final static String LIB_NAME = "mobicents-dahdi-linux";
-
- static {
- try {
- System.loadLibrary(LIB_NAME);
- System.out.println("Loaded library mobicents-dahdi-linux");
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
-
- private int channelID;
- private int code;
- private String linkName;
- private int ioBufferSize = 32; // lets default to 32, it seems optimal.
- protected int fd;
-
- private Object link;
-
- protected SelectorKey selectorKey;
-
- public Channel() {
- }
-
- public int getChannelID() {
- return channelID;
- }
-
- public void setChannelID(int channelID) {
- this.channelID = channelID;
- }
-
- public void setCode(int code) {
- this.code = code;
- }
-
- public int getCode() {
- return code;
- }
-
- public void setLinkName(String linkName) {
- this.linkName = linkName;
- }
-
- public String getLinkName() {
- return linkName;
- }
-
- public int getIOBufferSize() {
- return ioBufferSize;
- }
-
- public void setIOBufferSize(int bufferSize) {
- this.ioBufferSize = bufferSize;
- }
-
- public void open() {
- int zapid = channelID;
- fd = openChannel(zapid, ioBufferSize);
- }
-
- /**
- * Opens this channel and prepares it for reading.
- *
- * @param id -
- * id of zap device, its appended at the end of path, for
- * instance: /dev/dahdi/${id}
- * @param bufferSize -
- * size of buffer to be used for I/O ops.
- */
- public native int openChannel(int id, int bufferSize);
-
- /**
- * Reads data from this pipe.
- *
- * @param buffer
- * the byte buffer to read data.
- * @return the number of bytes actualy read.
- */
- public int read(byte[] buffer) throws IOException {
- int result=readData(fd, buffer,ioBufferSize);
- if(result==-1)
- {
- doUnregister(fd);
- close();
- int zapid = channelID;
- fd = openChannel(zapid, ioBufferSize);
- doRegister(fd);
-
- return 0;
- }
-
- return result;
- }
-
- public native int readData(int fd, byte[] buffer, int bufferSize);
-
- /**
- * Writes specified data to the pipe.
- *
- * @param buffer
- * the buffer with data to write
- * @param len
- * the length of the buffer.
- */
- public int write(byte[] buffer) throws IOException {
- writeData(fd, buffer, buffer.length);
- return buffer.length; // ?
- }
-
- public native void writeData(int fd, byte[] buffer, int len);
-
- /**
- * Registers pipe for polling.
- *
- * @param fd
- * the file descriptor.
- */
- public native void doRegister(int fd);
-
- /**
- * Unregisters pipe from polling.
- *
- * @param fd
- * the file descriptor.
- */
- public native void doUnregister(int fd);
-
- public void close() {
- closeChannel(fd);
- }
-
- /**
- * Closes this pipe.
- */
- public native void closeChannel(int fd);
-
- @Override
- public String toString() {
- return Integer.toString(channelID);
- }
-
- public void setLink(Object link) {
- this.link = link;
- }
-
- public Object getLink() {
- return this.link;
- }
-
- protected void doRegister(StreamSelector selector) {
- doRegister(fd);
- }
-
- protected void doUnregister(StreamSelector selector) {
- doUnregister(fd);
- }
-
- public boolean isReadable() {
- throw new UnsupportedOperationException("Not supported yet.");
- }
-
- public boolean isWriteable() {
- throw new UnsupportedOperationException("Not supported yet.");
- }
-
- public SelectorProvider provider() {
- throw new UnsupportedOperationException("Not supported yet.");
- }
-
- public SelectorKey register(StreamSelector selector) throws
IOException {
- return ((Selector) selector).register(this);
- }
-
- public void write(byte[] data, int len) throws IOException {
- this.writeData(fd, data, len);
- }
-
- public int read(ByteBuffer arg0) throws IOException {
- // TODO Auto-generated method stub
- return 0;
- }
-
- public int write(ByteBuffer arg0) throws IOException {
- // TODO Auto-generated method stub
- return 0;
- }
-
-}
=======================================
---
/hardware/dahdi/java/src/main/java/org/mobicents/ss7/hardware/dahdi/Selector.java
Mon May 28 08:12:44 2012
+++ /dev/null
@@ -1,171 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2011, Red Hat, Inc. and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-
-package org.mobicents.media.hardware.dahdi;
-
-import java.io.IOException;
-
-import javolution.util.FastList;
-
-import org.apache.log4j.Logger;
-import org.mobicents.protocols.stream.api.SelectorKey;
-import org.mobicents.protocols.stream.api.Stream;
-import org.mobicents.protocols.stream.api.StreamSelector;
-
-/**
- *
- * @author amit bhayani
- *
- */
-public class Selector implements StreamSelector {
-
- private final static String LIB_NAME = "mobicents-dahdi-linux";
-
- public final static int READ = 0x01;
- public final static int WRITE = 0x02;
-
- /** array of selected file descriptors */
- private int fds[] = new int[480];
-
- /** array of registered channels */
- private FastList<Channel> registered = new FastList<Channel>();
-
- private int ops;
-
- /** array of selected channels */
- private FastList<SelectorKey> selected = new FastList<SelectorKey>();
- private static Logger logger = Logger.getLogger(Selector.class);
-
- static {
- try {
- System.loadLibrary(LIB_NAME);
- System.out.println("Loaded library mobicents-dahdi-linux");
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
-
- public Selector() {
-
- }
-
- /**
- * Register channel with this selector.
- *
- * @param channel
- * the channel to register.
- */
- public SelectorKey register(Channel channel) {
- // add channel instance to the collection
- registered.add(channel);
- // perform actual registration
- logger.info("Registering file descriptor:" + ((Channel)
channel).fd);
- doRegister(((Channel) channel).fd);
-
- SelectorKeyImpl key = new SelectorKeyImpl(channel, this);
- channel.selectorKey = key;
- return key;
- }
-
- /**
- * Unregister channel.
- *
- * @param channel
- * the channel to unregister.
- */
- public void unregister(Channel channel) {
- registered.remove(channel);
- channel.selectorKey = null;
- doUnregister(((Channel) channel).fd);
- }
-
- /**
- * Registers pipe for polling.
- *
- * @param fd
- * the file descriptor.
- */
- public native void doRegister(int fd);
-
- /**
- * Unregisters pipe from polling.
- *
- * @param fd
- * the file descriptor.
- */
- public native void doUnregister(int fd);
-
- /**
- * Delegates select call to unix poll function.
- *
- * @param fds
- * the list of file descriptors.
- * @param key
- * selection key.
- * @return the number of selected channels.
- */
- public native int doPoll(int[] fds, int key, int timeout);
-
- public FastList<SelectorKey> selectNow(int ops, int timeout)
- throws IOException {
- int count = doPoll(fds, ops, 20);
- selected.clear();
- for (int i = 0; i < count; i++) {
- for (FastList.Node<Channel> n = registered.head(), end =
registered
- .tail(); (n = n.getNext()) != end;) {
- Channel channel = (Channel) n.getValue();
- if (channel.fd == fds[i]) {
- selected.add(channel.selectorKey);
- }
- }
- }
- return selected;
- }
-
- public void setOperation(int v) {
- throw new UnsupportedOperationException("Not supported yet.");
- }
-
- public int getOperations() {
- throw new UnsupportedOperationException("Not supported yet.");
- }
-
- public boolean isReadOperation() {
- throw new UnsupportedOperationException("Not supported yet.");
- }
-
- public boolean isWriteOperation() {
- throw new UnsupportedOperationException("Not supported yet.");
- }
-
- public boolean isClosed() {
- throw new UnsupportedOperationException("Not supported yet.");
- }
-
- public void close() {
- throw new UnsupportedOperationException("Not supported yet.");
- }
-
- public FastList<Stream> getRegisteredStreams() {
- throw new UnsupportedOperationException("Not supported yet.");
- }
-}
=======================================
---
/hardware/dahdi/java/src/main/java/org/mobicents/ss7/hardware/dahdi/SelectorKeyImpl.java
Mon May 28 08:12:44 2012
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2011, Red Hat, Inc. and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-
-/*
- * To change this template, choose Tools | Templates
- * and open the template in the editor.
- */
-
-package org.mobicents.media.hardware.dahdi;
-
-import org.mobicents.protocols.stream.api.SelectorKey;
-import org.mobicents.protocols.stream.api.Stream;
-import org.mobicents.protocols.stream.api.StreamSelector;
-
-/**
- *
- * @author kulikov
- */
-public class SelectorKeyImpl implements SelectorKey {
-
- private boolean isValid;
- private boolean isReadable;
- private boolean isWritable;
-
- private Channel channel;
- private Selector selector;
-
- private Object attachment;
-
- protected SelectorKeyImpl(Channel channel, Selector selector) {
- this.channel = channel;
- this.selector = selector;
- }
-
- public boolean isValid() {
- throw new UnsupportedOperationException("Not supported yet.");
- }
-
- public boolean isReadable() {
- return isReadable;
- }
-
- public boolean isWriteable() {
- return isWritable;
- }
-
- public Stream getStream() {
- return channel;
- }
-
- public StreamSelector getStreamSelector() {
- return selector;
- }
-
- public void cancel() {
- selector.unregister(channel);
- }
-
- public void attach(Object obj) {
- this.attachment = obj;
- }
-
- public Object attachment() {
- return this.attachment;
- }
-
-}
=======================================
--- /.gitignore Wed Jan 25 11:55:30 2012
+++ /.gitignore Tue Jun 5 11:34:58 2012
@@ -1,4 +1,15 @@
/.project
+# ignore .svn metadata files
+.svn
+# ignore Maven generated target folders
+~
+target
+classes
+*.zip
+
+# temp files
+*~
+
# Ignore Maven target/ dirs
/**/target/**/*
=======================================
--- /hardware/dahdi/java/pom.xml Fri Jun 1 08:57:08 2012
+++ /hardware/dahdi/java/pom.xml Tue Jun 5 11:34:58 2012
@@ -5,7 +5,7 @@
<parent>
<groupId>org.mobicents.media.hardware</groupId>
- <artifactId>mobicents-media-hardware</artifactId>
+ <artifactId>mobicents-dahdi-parent</artifactId>
<version>2.2.0.FINAL</version>
</parent>
=======================================
--- /hardware/dahdi/native/pom.xml Fri Jun 1 08:57:08 2012
+++ /hardware/dahdi/native/pom.xml Tue Jun 5 11:34:58 2012
@@ -3,11 +3,11 @@
<parent>
<groupId>org.mobicents.media.hardware</groupId>
- <artifactId>mobicents-media-hardware</artifactId>
+ <artifactId>mobicents-dahdi-parent</artifactId>
<version>2.2.0.FINAL</version>
</parent>
- <artifactId>mobicents-dahdi-native</artifactId>
+ <artifactId>mobicents-dahdi-native</artifactId>
<packaging>pom</packaging>
@@ -57,7 +57,7 @@
<module>linux</module>
</modules>
</profile>
- <profile>
+ <!--profile>
<id>maven-release</id>
<modules>
<module>linux</module>
@@ -68,7 +68,7 @@
<modules>
<module>linux</module>
</modules>
- </profile>
+ </profile-->
</profiles>
</project>
=======================================
--- /hardware/pom.xml Fri Jun 1 08:57:08 2012
+++ /hardware/pom.xml Tue Jun 5 11:34:58 2012
@@ -27,12 +27,6 @@
<profiles>
<profile>
<id>maven-release</id>
- <modules>
- <!--
- <module>dahdi</module>
- -->
- <module>dialogic</module>
- </modules>
</profile>
</profiles>
=======================================
--- /pom.xml Fri Jun 1 08:57:08 2012
+++ /pom.xml Tue Jun 5 11:34:58 2012
@@ -3,19 +3,39 @@
<modelVersion>4.0.0</modelVersion>
<packaging>pom</packaging>
+ <parent>
+ <groupId>org.mobicents</groupId>
+ <artifactId>mobicents-parent</artifactId>
+ <version>2.22</version>
+ </parent>
+
<groupId>org.mobicents.media</groupId>
<artifactId>server</artifactId>
<version>2.2.0.FINAL</version>
<name>Mobicents Media Server</name>
+ <url>http://code.google.com/p/mediaserver/</url>
+ <organization>
+ <name>TeleStax, Inc.</name>
+ <url>http://www.telestax.com</url>
+ </organization>
+ <issueManagement>
+ <url>http://code.google.com/p/mediaserver/issues/list</url>
+ </issueManagement>
<properties>
<!-- RELEASE CONFIGURATION -->
<release.name>
${release.name.prefix}${parent.version}${release.name.suffix}
</release.name>
-
- <mobicents.tools.mavenplugin.eclipse.version>
+
+ <version.xerces>2.9.1</version.xerces>
+ <log4j.version>1.2.12</log4j.version>
+ <concurrent.version>1.3.4</concurrent.version>
+ <version.freetts>1.2.2</version.freetts>
+ <version.jboss.microcontainer>2.2.0.M2</version.jboss.microcontainer>
+
+ <!--mobicents.tools.mavenplugin.eclipse.version>
1.0.0.BETA2
</mobicents.tools.mavenplugin.eclipse.version>
<version.jboss.jbossas>5.0.1.GA</version.jboss.jbossas>
@@ -24,7 +44,7 @@
</version.jboss.microcontainer>
<version.junit>4.4</version.junit>
<version.javassist>3.9.0.GA</version.javassist>
- <version.xerces>2.9.1</version.xerces>
+
<version.freetts>1.2.2</version.freetts>
<log4j.version>1.2.12</log4j.version>
<version.concurrent>1.3.4</version.concurrent>
@@ -32,7 +52,7 @@
<version.stream>1.0.0-SNAPSHOT</version.stream>
<version.m3ua>1.0.0-SNAPSHOT</version.m3ua>
<version.hardware>1.0.0-SNAPSHOT</version.hardware>
- <version.ss7.management>1.0.0-SNAPSHOT</version.ss7.management>
+ <version.ss7.management>1.0.0-SNAPSHOT</version.ss7.management-->
</properties>
<modules>
@@ -45,7 +65,7 @@
<module>resources</module>
<module>chassis</module>
<module>endpoints</module>
- <module>controls</module>
+ <module>controls</module>
<module>bootstrap</module>
</modules>
@@ -59,7 +79,7 @@
<dependency>
<groupId>concurrent</groupId>
<artifactId>concurrent</artifactId>
- <version>${version.concurrent}</version>
+ <version>${concurrent.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
@@ -71,7 +91,7 @@
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
- <version>${version.junit}</version>
+ <version>${junit.version}</version>
<scope>test</scope>
</dependency>
<dependency>
@@ -105,33 +125,48 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
- <version>2.0-beta-9</version>
<configuration>
- <remoteTagging>true</remoteTagging>
-
<autoVersionSubmodules>true</autoVersionSubmodules>
-
- <tagBase>
-
https://mobicents.googlecode.com/svn/tags/servers/media/2.x.y
- </tagBase>
- <resume>false</resume>
+
<autoVersionSubmodules>true</autoVersionSubmodules>
<preparationGoals>clean
install</preparationGoals>
</configuration>
</plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-source-plugin</artifactId>
+ <version>2.1.2</version>
+ <executions>
+ <execution>
+ <id>attach-sources</id>
+ <phase>verify</phase>
+ <goals>
+ <goal>jar</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ <version>2.8.1</version>
+ <executions>
+ <execution>
+ <id>attach-javadocs</id>
+ <phase>verify</phase>
+ <goals>
+ <goal>jar</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
</plugins>
</build>
</profile>
</profiles>
<scm>
- <connection>
-
scm:svn:https://mobicents.googlecode.com/svn/trunk/servers/media
- </connection>
- <developerConnection>
-
scm:svn:https://mobicents.googlecode.com/svn/trunk/servers/media
- </developerConnection>
- <url>
- http://mobicents.googlecode.com/svn/trunk/servers/media
- </url>
+
<connection>scm:git:https://code.google.com/p/mediaserver/</connection>
+
<developerConnection>scm:git:https://code.google.com/p/mediaserver/</developerConnection>
+ <url>https://code.google.com/p/mediaserver/</url>
</scm>
<!-- -->
@@ -161,21 +196,15 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-release-plugin</artifactId>
- <version>2.0-beta-9</version>
- <configuration>
- <remoteTagging>true</remoteTagging>
- <autoVersionSubmodules>true</autoVersionSubmodules>
- <resume>false</resume>
- <tagBase>
-
https://mobicents.googlecode.com/svn/tags/servers/media/2.x.y
- </tagBase>
+ <artifactId>maven-release-plugin</artifactId>
+ <configuration>
+ <autoVersionSubmodules>true</autoVersionSubmodules>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
- <version>2.0.2</version>
+ <version>2.5.1</version>
<configuration>
<source>1.5</source>
<target>1.5</target>
@@ -191,48 +220,35 @@
-->
<repositories>
- <repository>
- <id>maven</id>
- <name>Maven Repository</name>
- <url>http://repo1.maven.org/maven2</url>
- <snapshots>
- <enabled>false</enabled>
- </snapshots>
- </repository>
- <repository>
- <id>jboss</id>
- <name>JBoss Repository</name>
- <url>http://repository.jboss.org</url>
- <snapshots>
- <enabled>false</enabled>
- </snapshots>
- </repository>
- <repository>
- <id>jboss-snapshots</id>
- <name>JBoss Snapshot Repository</name>
- <url>http://snapshots.jboss.org/maven2</url>
- <releases>
- <enabled>false</enabled>
- </releases>
- <snapshots>
- <enabled>true</enabled>
- </snapshots>
- </repository>
-
- <repository>
- <id>jboss-public-repository-group</id>
- <name>JBoss Public Maven Repository Group</name>
-
<url>http://repository.jboss.org/nexus/content/groups/public/</url>
- <layout>default</layout>
- <releases>
- <enabled>true</enabled>
- <updatePolicy>never</updatePolicy>
- </releases>
- <snapshots>
- <enabled>true</enabled>
- <updatePolicy>never</updatePolicy>
- </snapshots>
- </repository>
+
+ <repository>
+ <id>mobicents-public-repository-group</id>
+ <name>Mobicens Public Maven Repository Group</name>
+
<url>https://oss.sonatype.org/content/groups/public</url>
+ <layout>default</layout>
+ <releases>
+ <enabled>true</enabled>
+ <updatePolicy>never</updatePolicy>
+ </releases>
+ <snapshots>
+ <enabled>true</enabled>
+ <updatePolicy>never</updatePolicy>
+ </snapshots>
+ </repository>
+ <repository>
+ <id>jboss-public-repository-group</id>
+ <name>JBoss Public Maven Repository Group</name>
+
<url>https://repository.jboss.org/nexus/content/groups/public</url>
+ <layout>default</layout>
+ <releases>
+ <enabled>true</enabled>
+ <updatePolicy>never</updatePolicy>
+ </releases>
+ <snapshots>
+ <enabled>true</enabled>
+ <updatePolicy>never</updatePolicy>
+ </snapshots>
+ </repository>
<repository>
<id>jboss-deprecated</id>
<name>jboss-deprecated</name>
@@ -257,12 +273,5 @@
</pluginRepository>
</pluginRepositories>
- <url>http://code.google.com/p/mediaserver/</url>
- <organization>
- <name>TeleStax, Inc.</name>
- <url>http://www.telestax.com</url>
- </organization>
- <issueManagement>
- <url>http://code.google.com/p/mediaserver/issues/list</url>
- </issueManagement>
+
</project>