jrubycipango 0.2.0 → 0.2.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/lib/jrubycipango.rb +21 -10
- data/lib/jrubycipango/factory.rb +1 -2
- data/lib/jrubycipango/jars/jetty/jetty-continuation-7.6.7.v20120910.jar +0 -0
- data/lib/jrubycipango/jars/jetty/jetty-deploy-7.6.7.v20120910.jar +0 -0
- data/lib/jrubycipango/jars/jetty/jetty-http-7.6.7.v20120910.jar +0 -0
- data/lib/jrubycipango/jars/jetty/jetty-io-7.6.7.v20120910.jar +0 -0
- data/lib/jrubycipango/jars/jetty/jetty-security-7.6.7.v20120910.jar +0 -0
- data/lib/jrubycipango/jars/jetty/jetty-server-7.6.7.v20120910.jar +0 -0
- data/lib/jrubycipango/jars/jetty/jetty-servlet-7.6.7.v20120910.jar +0 -0
- data/lib/jrubycipango/jars/jetty/jetty-servlets-7.6.7.v20120910.jar +0 -0
- data/lib/jrubycipango/jars/jetty/jetty-util-7.6.7.v20120910.jar +0 -0
- data/lib/jrubycipango/jars/jetty/jetty-webapp-7.6.7.v20120910.jar +0 -0
- data/lib/jrubycipango/jars/jetty/jetty-websocket-7.6.7.v20120910.jar +0 -0
- data/lib/jrubycipango/jars/jetty/jetty-xml-7.6.7.v20120910.jar +0 -0
- data/lib/jrubycipango/jars/{servlet-api-2.5.jar → jetty/servlet-api-2.5.jar} +0 -0
- data/lib/jrubycipango/jars/sip/cipango-annotations-2.2-SNAPSHOT.jar +0 -0
- data/lib/jrubycipango/jars/sip/cipango-callflow-2.2-SNAPSHOT.jar +0 -0
- data/lib/jrubycipango/jars/sip/cipango-dar-2.2-SNAPSHOT.jar +0 -0
- data/lib/jrubycipango/jars/sip/cipango-deploy-2.2-SNAPSHOT.jar +0 -0
- data/lib/jrubycipango/jars/sip/cipango-jmx-2.2-SNAPSHOT.jar +0 -0
- data/lib/jrubycipango/jars/sip/cipango-plus-2.2-SNAPSHOT.jar +0 -0
- data/lib/jrubycipango/jars/sip/cipango-server-2.2-SNAPSHOT.jar +0 -0
- data/lib/jrubycipango/jars/{commons-jexl-1.1.jar → sip/commons-jexl-1.1.jar} +0 -0
- data/lib/jrubycipango/jars/{commons-logging-1.0.3.jar → sip/commons-logging-1.0.3.jar} +0 -0
- metadata +33 -75
- data/lib/jrubycipango/jars/cipango-annotations-2.0.0.jar +0 -0
- data/lib/jrubycipango/jars/cipango-callflow-2.0.0.jar +0 -0
- data/lib/jrubycipango/jars/cipango-dar-2.0.0.jar +0 -0
- data/lib/jrubycipango/jars/cipango-deploy-2.0.0.jar +0 -0
- data/lib/jrubycipango/jars/cipango-jmx-2.0.0.jar +0 -0
- data/lib/jrubycipango/jars/cipango-plus-2.0.0.jar +0 -0
- data/lib/jrubycipango/jars/cipango-server-2.0.0.jar +0 -0
- data/lib/jrubycipango/jars/jetty-continuation-7.2.2.v20101205.jar +0 -0
- data/lib/jrubycipango/jars/jetty-deploy-7.2.2.v20101205.jar +0 -0
- data/lib/jrubycipango/jars/jetty-http-7.2.2.v20101205.jar +0 -0
- data/lib/jrubycipango/jars/jetty-io-7.2.2.v20101205.jar +0 -0
- data/lib/jrubycipango/jars/jetty-security-7.2.2.v20101205.jar +0 -0
- data/lib/jrubycipango/jars/jetty-server-7.2.2.v20101205.jar +0 -0
- data/lib/jrubycipango/jars/jetty-servlet-7.2.2.v20101205.jar +0 -0
- data/lib/jrubycipango/jars/jetty-servlets-7.2.2.v20101205.jar +0 -0
- data/lib/jrubycipango/jars/jetty-util-7.2.2.v20101205.jar +0 -0
- data/lib/jrubycipango/jars/jetty-webapp-7.2.2.v20101205.jar +0 -0
- data/lib/jrubycipango/jars/jetty-xml-7.2.2.v20101205.jar +0 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 6cf609ec9ccbb2167bed49f9c4ae48f1b1db8ef8
|
4
|
+
data.tar.gz: d71a351783c7a397754307104a038bd4444f02c0
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: bc0f31d6912ed43c0d043251eac1bafdb066057829b8ea207ac94c6f9456a458045e7dd8309a98483be3247042d11aecc019f4b126401bc3d9a0517b459dc976
|
7
|
+
data.tar.gz: 805edfb8dd85f4a0240c50b6a9d7039beb543408bbd523cb1dcd8037d57fe8dce557924fcd9d934d0dce7efe733f1ac527799359dad68f13d9b6828a423d0a40
|
data/lib/jrubycipango.rb
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
|
1
2
|
# jrubyciango gem
|
2
3
|
# Embedding Cipango HTTP/SIP application server into a JRuby application
|
3
4
|
|
@@ -6,6 +7,8 @@ require 'java'
|
|
6
7
|
# --- Cipango/Jetty and JRuby Rack jars -----
|
7
8
|
dir = File.dirname(File.expand_path(__FILE__))
|
8
9
|
Dir[dir + "/jrubycipango/jars/*.jar"].each { |jar| require jar }
|
10
|
+
Dir[dir + "/jrubycipango/jars/sip/*.jar"].each { |jar| require jar }
|
11
|
+
Dir[dir + "/jrubycipango/jars/jetty/*.jar"].each { |jar| require jar }
|
9
12
|
|
10
13
|
require 'jrubycipango/factory'
|
11
14
|
|
@@ -39,10 +42,12 @@ module JRubyCipango
|
|
39
42
|
# :sip_port
|
40
43
|
# :context_path
|
41
44
|
# :resource_base
|
45
|
+
# :route_outgoing_requests
|
42
46
|
def initialize(params={})
|
43
47
|
@host_ip_address = params[:host_ip_address] || '0.0.0.0'
|
44
48
|
@http_port = params[:http_port] || 8080
|
45
49
|
@sip_port = params[:sip_port] || 5060
|
50
|
+
@route_outgoing_requests = params[:route_outgoing_requests] || false
|
46
51
|
|
47
52
|
@context_path = params[:context_path] || '/'
|
48
53
|
@resource_base = params[:resource_base] || '.'
|
@@ -66,6 +71,7 @@ module JRubyCipango
|
|
66
71
|
# Options:
|
67
72
|
# :rackup_file - default 'config.ru'
|
68
73
|
# :static_path - path to static content, default '/public'
|
74
|
+
|
69
75
|
def add_rackup rackup_options = {}
|
70
76
|
rackup_options[:rackup_file] ||= 'config.ru'
|
71
77
|
rackup_options[:static_path] ||= '/public'
|
@@ -74,9 +80,10 @@ module JRubyCipango
|
|
74
80
|
@has_rack_app = true
|
75
81
|
end
|
76
82
|
|
77
|
-
#
|
83
|
+
# Add SIP servlet object
|
78
84
|
# :options => {:is_event_listener => false}
|
79
|
-
#
|
85
|
+
# If :is_event_listener is true the servlet must include a Java Sip listener interface(s) (javax.servlet.sip.SipSessionListener, TimerListener or other)
|
86
|
+
|
80
87
|
def add_sip_servlet sip_servlet, options={}
|
81
88
|
options[:is_event_listener] ||= false
|
82
89
|
options[:servlet_name] ||= nil
|
@@ -84,6 +91,7 @@ module JRubyCipango
|
|
84
91
|
end
|
85
92
|
|
86
93
|
# Start the Cipango server
|
94
|
+
|
87
95
|
def start
|
88
96
|
@cipango = cipango = Server.new
|
89
97
|
|
@@ -100,26 +108,27 @@ module JRubyCipango
|
|
100
108
|
|
101
109
|
tcp_http = SocketConnector.new
|
102
110
|
tcp_http.port = @http_port
|
111
|
+
tcp_http.host = @host_ip_address
|
103
112
|
cipango.connectors = [tcp_http].to_java(Connector)
|
104
113
|
|
105
114
|
context = SipAppContext.new
|
106
115
|
context.context_path = @context_path
|
107
116
|
context.resource_base = @resource_base
|
108
|
-
|
117
|
+
|
118
|
+
|
119
|
+
$sip_servlet_context = context.servlet_context
|
109
120
|
|
110
121
|
context.set_init_parameter('jruby.max.runtimes', '1')
|
122
|
+
#context.set_init_parameter('org.cipango.dar.routeOutgoingRequests', 'false')
|
123
|
+
|
111
124
|
#context.set_init_parameter('org.eclipse.jetty.servlet.Default.resourceCache', '0')
|
112
125
|
#context.set_init_parameter('org.eclipse.jetty.servlet.Default.relativeResourceBase', '/public')
|
113
126
|
|
114
|
-
#def_http_servlet_holder = ServletHolder.new(DefaultServlet.new)
|
115
|
-
#include javax.servlet.sip.SipSessionListener
|
116
|
-
#def_http_servlet_holder.set_init_parameter('org.eclipse.jetty.servlet.Default.relativeResourceBase', '/')
|
117
127
|
|
118
128
|
if @has_rack_app
|
119
129
|
context.set_init_parameter('rackup', File.read(@rackup_options[:rackup_file]))
|
120
130
|
context.add_filter("org.jruby.rack.RackFilter", "/*", FilterMapping::DEFAULT)
|
121
131
|
context.add_event_listener( Factory::JRCRackListener.new )
|
122
|
-
|
123
132
|
end
|
124
133
|
|
125
134
|
@http_servlets.each do |servlet|
|
@@ -128,16 +137,14 @@ module JRubyCipango
|
|
128
137
|
servlet_holder.name = servlet[:servlet_name] if servlet[:servlet_name]
|
129
138
|
params = servlet[:init_params]
|
130
139
|
params.each{|k, v| servlet_holder.set_init_parameter(k, v) }
|
131
|
-
# puts "Context path: " + servlet[:context_path]
|
132
140
|
|
133
141
|
context.add_servlet(servlet_holder, servlet[:context_path])
|
134
142
|
end
|
135
143
|
|
136
144
|
# It has to be a custom listener, not the Rack listener, in order to be in the same runtime and have access to the Rack application's namespace.
|
137
|
-
|
145
|
+
# context.add_event_listener( Factory::RackServletContextListener.new )
|
138
146
|
|
139
147
|
@sip_servlets.each do |servlet_data|
|
140
|
-
#puts "servlet data #{servlet_data[:options]}"
|
141
148
|
servlet_holder = SipServletHolder.new(servlet_data[:servlet])
|
142
149
|
servlet_holder.name = servlet_data[:options][:servlet_name] if servlet_data[:options][:servlet_name]
|
143
150
|
context.add_sip_servlet(servlet_holder)
|
@@ -147,6 +154,10 @@ module JRubyCipango
|
|
147
154
|
context_collection = SipContextHandlerCollection.new
|
148
155
|
context_collection.add_handler(context)
|
149
156
|
|
157
|
+
dar = DefaultApplicationRouter.new
|
158
|
+
cipango.application_router = dar
|
159
|
+
dar.route_outgoing_requests = @route_outgoing_requests
|
160
|
+
|
150
161
|
cipango.handler = context_collection
|
151
162
|
cipango.start
|
152
163
|
cipango.join
|
data/lib/jrubycipango/factory.rb
CHANGED
@@ -1,5 +1,4 @@
|
|
1
|
-
|
2
|
-
# ne zaboraviti u config/production.rb postaviti config.precompiled_assets ili tako nesto na true
|
1
|
+
# Rails: ne zaboraviti u config/environments/production.rb postaviti config.assets.compile=true
|
3
2
|
module JRubyCipango
|
4
3
|
module Factory
|
5
4
|
['org.jruby.rack.DefaultRackApplicationFactory',
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
File without changes
|
File without changes
|
metadata
CHANGED
@@ -1,8 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jrubycipango
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
version: 0.2.0
|
4
|
+
version: 0.2.11
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Amer Hasanovic
|
@@ -10,7 +9,7 @@ authors:
|
|
10
9
|
autorequire:
|
11
10
|
bindir: bin
|
12
11
|
cert_chain: []
|
13
|
-
date:
|
12
|
+
date: 2014-06-29 00:00:00.000000000 Z
|
14
13
|
dependencies: []
|
15
14
|
description: Create SIP/HTTP applications using embedded Cipago server.
|
16
15
|
email:
|
@@ -22,92 +21,51 @@ extra_rdoc_files: []
|
|
22
21
|
files:
|
23
22
|
- lib/jrubycipango.rb
|
24
23
|
- lib/jrubycipango/factory.rb
|
25
|
-
-
|
26
|
-
|
27
|
-
|
28
|
-
-
|
29
|
-
|
30
|
-
-
|
31
|
-
|
32
|
-
|
33
|
-
-
|
34
|
-
|
35
|
-
|
36
|
-
-
|
37
|
-
|
38
|
-
|
39
|
-
-
|
40
|
-
|
41
|
-
|
42
|
-
-
|
43
|
-
|
44
|
-
|
45
|
-
-
|
46
|
-
|
47
|
-
|
48
|
-
-
|
49
|
-
bGliL2pydWJ5Y2lwYW5nby9qYXJzL2pydWJ5LXJhY2stMS4xLjEzLjEuamFy
|
50
|
-
- !binary |-
|
51
|
-
bGliL2pydWJ5Y2lwYW5nby9qYXJzL2pldHR5LXdlYmFwcC03LjIuMi52MjAx
|
52
|
-
MDEyMDUuamFy
|
53
|
-
- !binary |-
|
54
|
-
bGliL2pydWJ5Y2lwYW5nby9qYXJzL2pldHR5LWRlcGxveS03LjIuMi52MjAx
|
55
|
-
MDEyMDUuamFy
|
56
|
-
- !binary |-
|
57
|
-
bGliL2pydWJ5Y2lwYW5nby9qYXJzL3NpcC1hcGktMS4xLmphcg==
|
58
|
-
- !binary |-
|
59
|
-
bGliL2pydWJ5Y2lwYW5nby9qYXJzL2NvbW1vbnMtbG9nZ2luZy0xLjAuMy5q
|
60
|
-
YXI=
|
61
|
-
- !binary |-
|
62
|
-
bGliL2pydWJ5Y2lwYW5nby9qYXJzL2NpcGFuZ28tZGFyLTIuMC4wLmphcg==
|
63
|
-
- !binary |-
|
64
|
-
bGliL2pydWJ5Y2lwYW5nby9qYXJzL2pldHR5LXV0aWwtNy4yLjIudjIwMTAx
|
65
|
-
MjA1Lmphcg==
|
66
|
-
- !binary |-
|
67
|
-
bGliL2pydWJ5Y2lwYW5nby9qYXJzL2pldHR5LXNlcnZsZXRzLTcuMi4yLnYy
|
68
|
-
MDEwMTIwNS5qYXI=
|
69
|
-
- !binary |-
|
70
|
-
bGliL2pydWJ5Y2lwYW5nby9qYXJzL2pldHR5LWh0dHAtNy4yLjIudjIwMTAx
|
71
|
-
MjA1Lmphcg==
|
72
|
-
- !binary |-
|
73
|
-
bGliL2pydWJ5Y2lwYW5nby9qYXJzL2pldHR5LXNlcnZsZXQtNy4yLjIudjIw
|
74
|
-
MTAxMjA1Lmphcg==
|
75
|
-
- !binary |-
|
76
|
-
bGliL2pydWJ5Y2lwYW5nby9qYXJzL2NpcGFuZ28tam14LTIuMC4wLmphcg==
|
77
|
-
- !binary |-
|
78
|
-
bGliL2pydWJ5Y2lwYW5nby9qYXJzL2NpcGFuZ28tcGx1cy0yLjAuMC5qYXI=
|
79
|
-
- !binary |-
|
80
|
-
bGliL2pydWJ5Y2lwYW5nby9qYXJzL2pldHR5LXNlcnZlci03LjIuMi52MjAx
|
81
|
-
MDEyMDUuamFy
|
82
|
-
- !binary |-
|
83
|
-
bGliL2pydWJ5Y2lwYW5nby9qYXJzL2pldHR5LWNvbnRpbnVhdGlvbi03LjIu
|
84
|
-
Mi52MjAxMDEyMDUuamFy
|
85
|
-
- !binary |-
|
86
|
-
bGliL2pydWJ5Y2lwYW5nby9qYXJzL2NvbW1vbnMtamV4bC0xLjEuamFy
|
24
|
+
- lib/jrubycipango/jars/sip-api-1.1.jar
|
25
|
+
- lib/jrubycipango/jars/jruby-rack-1.1.13.1.jar
|
26
|
+
- lib/jrubycipango/jars/sip/commons-jexl-1.1.jar
|
27
|
+
- lib/jrubycipango/jars/sip/cipango-deploy-2.2-SNAPSHOT.jar
|
28
|
+
- lib/jrubycipango/jars/sip/cipango-dar-2.2-SNAPSHOT.jar
|
29
|
+
- lib/jrubycipango/jars/sip/cipango-jmx-2.2-SNAPSHOT.jar
|
30
|
+
- lib/jrubycipango/jars/sip/cipango-server-2.2-SNAPSHOT.jar
|
31
|
+
- lib/jrubycipango/jars/sip/cipango-plus-2.2-SNAPSHOT.jar
|
32
|
+
- lib/jrubycipango/jars/sip/cipango-annotations-2.2-SNAPSHOT.jar
|
33
|
+
- lib/jrubycipango/jars/sip/commons-logging-1.0.3.jar
|
34
|
+
- lib/jrubycipango/jars/sip/cipango-callflow-2.2-SNAPSHOT.jar
|
35
|
+
- lib/jrubycipango/jars/jetty/jetty-xml-7.6.7.v20120910.jar
|
36
|
+
- lib/jrubycipango/jars/jetty/jetty-io-7.6.7.v20120910.jar
|
37
|
+
- lib/jrubycipango/jars/jetty/jetty-security-7.6.7.v20120910.jar
|
38
|
+
- lib/jrubycipango/jars/jetty/jetty-util-7.6.7.v20120910.jar
|
39
|
+
- lib/jrubycipango/jars/jetty/jetty-http-7.6.7.v20120910.jar
|
40
|
+
- lib/jrubycipango/jars/jetty/jetty-continuation-7.6.7.v20120910.jar
|
41
|
+
- lib/jrubycipango/jars/jetty/jetty-deploy-7.6.7.v20120910.jar
|
42
|
+
- lib/jrubycipango/jars/jetty/servlet-api-2.5.jar
|
43
|
+
- lib/jrubycipango/jars/jetty/jetty-server-7.6.7.v20120910.jar
|
44
|
+
- lib/jrubycipango/jars/jetty/jetty-websocket-7.6.7.v20120910.jar
|
45
|
+
- lib/jrubycipango/jars/jetty/jetty-servlet-7.6.7.v20120910.jar
|
46
|
+
- lib/jrubycipango/jars/jetty/jetty-webapp-7.6.7.v20120910.jar
|
47
|
+
- lib/jrubycipango/jars/jetty/jetty-servlets-7.6.7.v20120910.jar
|
87
48
|
homepage: http://ictlab.com.ba
|
88
49
|
licenses: []
|
50
|
+
metadata: {}
|
89
51
|
post_install_message:
|
90
52
|
rdoc_options: []
|
91
53
|
require_paths:
|
92
54
|
- lib
|
93
55
|
required_ruby_version: !ruby/object:Gem::Requirement
|
94
56
|
requirements:
|
95
|
-
- -
|
57
|
+
- - '>='
|
96
58
|
- !ruby/object:Gem::Version
|
97
|
-
version:
|
98
|
-
MA==
|
99
|
-
none: false
|
59
|
+
version: '0'
|
100
60
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
101
61
|
requirements:
|
102
|
-
- -
|
62
|
+
- - '>='
|
103
63
|
- !ruby/object:Gem::Version
|
104
|
-
version:
|
105
|
-
MA==
|
106
|
-
none: false
|
64
|
+
version: '0'
|
107
65
|
requirements: []
|
108
66
|
rubyforge_project:
|
109
|
-
rubygems_version: 1.
|
67
|
+
rubygems_version: 2.1.9
|
110
68
|
signing_key:
|
111
|
-
specification_version:
|
69
|
+
specification_version: 4
|
112
70
|
summary: JRubyCipango - embedded Cipango HTTP/SIP server
|
113
71
|
test_files: []
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|