Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Sally4
sally4-servlet
Commits
4f9ebfb0
Commit
4f9ebfb0
authored
Jun 24, 2014
by
Constantin Jucovschi
Browse files
updated .ignore
parent
b2cb9430
Changes
2
Hide whitespace changes
Inline
Side-by-side
.gitignore
View file @
4f9ebfb0
...
...
@@ -4,3 +4,5 @@ bin/
*.log
felix-cache
.metadata
*.versionsBackup
.settings
\ No newline at end of file
src/main/java/info/kwarc/sally4/servlet/impl/ServletImpl.java
View file @
4f9ebfb0
...
...
@@ -3,10 +3,13 @@ package info.kwarc.sally4.servlet.impl;
import
info.kwarc.sally4.core.CamelContextProvider
;
import
info.kwarc.sally4.servlet.SallyServlet
;
import
java.util.Dictionary
;
import
javax.servlet.ServletException
;
import
org.apache.camel.component.servlet.CamelHttpTransportServlet
;
import
org.apache.camel.component.servlet.ServletComponent
;
import
org.apache.felix.ipojo.annotations.Bind
;
import
org.apache.felix.ipojo.annotations.Component
;
import
org.apache.felix.ipojo.annotations.Instantiate
;
import
org.apache.felix.ipojo.annotations.Invalidate
;
...
...
@@ -24,14 +27,25 @@ import org.slf4j.LoggerFactory;
@Instantiate
public
class
ServletImpl
implements
SallyServlet
{
@Requires
HttpService
httpSevlet
;
final
static
String
portProperty
=
"org.osgi.service.http.port"
;
@Property
(
name
=
"SallyHost"
,
value
=
"http://localhost"
)
String
SallyHost
;
String
SallyURL
;
@Bind
public
void
bindService
(
HttpService
httpSevlet
,
Dictionary
<
String
,
Object
>
properties
)
{
SallyURL
=
SallyHost
+
":"
+
properties
.
get
(
portProperty
).
toString
();
log
.
info
(
"SALLYURL="
+
SallyURL
);
this
.
httpSevlet
=
httpSevlet
;
}
@Requires
CamelContextProvider
camelContextProvider
;
@Property
(
name
=
"SallyURL"
)
String
SallyURL
;
Logger
log
=
LoggerFactory
.
getLogger
(
getClass
());
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment