progress-jms-svn Mailing List for progress-jms
Status: Pre-Alpha
Brought to you by:
medu
You can subscribe to this list here.
| 2010 |
Jan
|
Feb
(4) |
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
(10) |
Sep
(56) |
Oct
(1) |
Nov
(8) |
Dec
(4) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2011 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(15) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: <me...@us...> - 2011-07-05 09:50:17
|
Revision: 102
http://progress-jms.svn.sourceforge.net/progress-jms/?rev=102&view=rev
Author: medu
Date: 2011-07-05 09:50:10 +0000 (Tue, 05 Jul 2011)
Log Message:
-----------
remove unused abstract objects
Removed Paths:
-------------
net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/AbstractConnection.cls
net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/TopicSession.cls
Property Changed:
----------------
net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/
Property changes on: net.sourceforge.progress.jms/src/net/sourceforge/progress/jms
___________________________________________________________________
Added: svn:ignore
+ *.listing
Deleted: net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/AbstractConnection.cls
===================================================================
--- net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/AbstractConnection.cls 2011-07-05 09:47:45 UTC (rev 101)
+++ net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/AbstractConnection.cls 2011-07-05 09:50:10 UTC (rev 102)
@@ -1,139 +0,0 @@
-/*------------------------------------------------------------------------
- File : AbstractConnection
- Purpose :
- Syntax :
- Description :
- Author(s) : Marian Edu
- Created : Mon Jan 04 20:13:09 EET 2010
- Notes :
-
- Email : mar...@gm...
- Website : www.ganimede.ro
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the Lesser GNU 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 program 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
- Lesser GNU General Public License for more details.
- You should have received a copy of the Lesser GNU General Public License
- along with this program. If not, see < http://www.gnu.org/licenses/>.
-
- ----------------------------------------------------------------------*/
-
-using javax.jms.*.
-
-class net.sourceforge.progress.jms.AbstractConnection
- implements javax.jms.Connection:
-
-
- define protected variable exceptionListener as ExceptionListener no-undo.
- define protected variable metaData as ConnectionMetaData no-undo.
- define protected variable clientId as character no-undo.
- define protected variable hadActivity as logical no-undo.
- define protected variable isActive as logical no-undo.
-
-
- constructor protected AbstractConnection ():
- end constructor.
-
- /*------------------------------------------------------------------------------
- Purpose: Closes the connection.
- ------------------------------------------------------------------------------*/
- method public void close():
- this-object:stop().
- end method.
-
- /*------------------------------------------------------------------------------
- Purpose: Gets the client identifier for this connection.
- ------------------------------------------------------------------------------*/
- method public character getClientID():
- return clientId.
- end method.
-
- /*------------------------------------------------------------------------------
- Purpose: Gets the message consumer's MessageListener.
- ------------------------------------------------------------------------------*/
- method public ExceptionListener getExceptionListener():
- if not valid-object(exceptionListener) then
- undo, throw new net.sourceforge.progress.jms.JMSException
- ('Invalid ExceptionListener.').
- return exceptionListener.
- end method.
-
- /*------------------------------------------------------------------------------
- Purpose: Gets the metadata for this connection.
- ------------------------------------------------------------------------------*/
- method public ConnectionMetaData getMetaData():
- if not valid-object(metaData) then
- undo, throw new net.sourceforge.progress.jms.JMSException
- ('Invalid ConnectionMetaData.').
- return metaData.
- end method.
-
- /*------------------------------------------------------------------------------
- Purpose: Sets the client identifier for this connection.
- ------------------------------------------------------------------------------*/
- method public void setClientID(clientID as character):
- define variable jmsConnection as Progress.Lang.Object no-undo.
-
- if this-object:clientId eq clientId then
- return.
-
- if hadActivity then
- undo, throw new net.sourceforge.progress.jms.IllegalStateException
- ('Can not set client identifier after action on connection has taken.').
- jmsConnection = session:first-object.
- do while valid-object(jmsConnection):
- if jmsConnection:GetClass():TypeName eq this-object:GetClass():TypeName and
- cast(jmsConnection, 'javax.jms.Connection':u):getClientID() eq clientId then
- undo, throw new net.sourceforge.progress.jms.InvalidClientIDException
- ('Duplicate client identifier on other provider connection.').
- jmsConnection = jmsConnection:next-sibling.
- end.
- this-object:clientId = clientId.
- end method.
-
- /*------------------------------------------------------------------------------
- Purpose: Gets the message consumer's MessageListener.
- ------------------------------------------------------------------------------*/
- method public void setExceptionListener(listener as ExceptionListener):
- if not valid-object(listener) then
- return.
- if valid-object(exceptionListener) then
- delete object exceptionListener no-error.
- exceptionListener = listener.
- end method.
-
- /*------------------------------------------------------------------------------
- Purpose: Starts (restarts) a connection's delivery of incoming messages.
- ------------------------------------------------------------------------------*/
- method public void start():
- if isActive then
- return.
-
- assign
- hadActivity = true
- isActive = true.
-
- end method.
-
- /*------------------------------------------------------------------------------
- Purpose: Temporarily stops a connection's delivery of incoming messages.
- ------------------------------------------------------------------------------*/
- method public void stop():
- isActive = false.
- end method.
-
- destructor public AbstractConnection ( ):
- this-object:close().
-
- if valid-object(metaData) then
- delete object metaData no-error.
- if valid-object(exceptionListener) then
- delete object exceptionListener no-error.
- end destructor.
-
-end class.
\ No newline at end of file
Deleted: net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/TopicSession.cls
===================================================================
--- net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/TopicSession.cls 2011-07-05 09:47:45 UTC (rev 101)
+++ net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/TopicSession.cls 2011-07-05 09:50:10 UTC (rev 102)
@@ -1,88 +0,0 @@
- /*------------------------------------------------------------------------
- File : TopicSession
- Purpose :
- Syntax :
- Description :
- Author(s) : Marian Edu
- Created : Mon Jan 04 21:45:46 EET 2010
- Notes :
-
- Email : mar...@gm...
- Website : www.ganimede.ro
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the Lesser GNU 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 program 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
- Lesser GNU General Public License for more details.
- You should have received a copy of the Lesser GNU General Public License
- along with this program. If not, see < http://www.gnu.org/licenses/>.
-
- ----------------------------------------------------------------------*/
-using javax.jms.*.
-using net.sourceforge.progress.jms.Session.
-
-
-
-class net.sourceforge.progress.jms.TopicSession inherits Session implements TopicSession :
-
-
-
- method public javax.jms.TopicSubscriber createDurableSubscriber( input topic as javax.jms.topic, input name as character ):
-
- undo, throw new Progress.Lang.AppError("METHOD NOT IMPLEMENTED").
-
- end method.
-
-
-
-
- method public javax.jms.TopicSubscriber createDurableSubscriber( input topic as javax.jms.topic, input name as character, input messageSelector as character, input noLocal as logical ):
-
- undo, throw new Progress.Lang.AppError("METHOD NOT IMPLEMENTED").
-
- end method.
-
-
-
-
- method public javax.jms.TopicPublisher createPublisher( input topic as javax.jms.topic ):
-
- undo, throw new Progress.Lang.AppError("METHOD NOT IMPLEMENTED").
-
- end method.
-
-
-
-
- method public javax.jms.TopicSubscriber createSubscriber( input topic as javax.jms.topic ):
-
- undo, throw new Progress.Lang.AppError("METHOD NOT IMPLEMENTED").
-
- end method.
-
-
-
-
- method public javax.jms.TopicSubscriber createSubscriber( input topic as javax.jms.topic, input messageSelector as character, input noLocal as logical ):
-
- undo, throw new Progress.Lang.AppError("METHOD NOT IMPLEMENTED").
-
- end method.
-
-
-
-
- method public javax.jms.topic createTopic( input topicName as character ):
-
- undo, throw new Progress.Lang.AppError("METHOD NOT IMPLEMENTED").
-
- end method.
-
-
-
-
-end class.
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <me...@us...> - 2011-07-05 09:47:52
|
Revision: 101
http://progress-jms.svn.sourceforge.net/progress-jms/?rev=101&view=rev
Author: medu
Date: 2011-07-05 09:47:45 +0000 (Tue, 05 Jul 2011)
Log Message:
-----------
package rename
Property Changed:
----------------
net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/provider/stomp/
Property changes on: net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/provider/stomp
___________________________________________________________________
Added: svn:ignore
+ *.listing
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <me...@us...> - 2011-07-05 09:44:56
|
Revision: 100
http://progress-jms.svn.sourceforge.net/progress-jms/?rev=100&view=rev
Author: medu
Date: 2011-07-05 09:44:49 +0000 (Tue, 05 Jul 2011)
Log Message:
-----------
clean-up stomp frame object
Modified Paths:
--------------
net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/provider/stomp/StompFrame.cls
Modified: net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/provider/stomp/StompFrame.cls
===================================================================
--- net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/provider/stomp/StompFrame.cls 2011-07-05 09:09:08 UTC (rev 99)
+++ net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/provider/stomp/StompFrame.cls 2011-07-05 09:44:49 UTC (rev 100)
@@ -30,88 +30,75 @@
using net.sourceforge.progress.util.StringHashMap.
using net.sourceforge.progress.lang.String.
+using net.sourceforge.progress.io.InputStream.
+using net.sourceforge.progress.io.OutputStream.
+using net.sourceforge.progress.io.DataInputStream.
+using net.sourceforge.progress.io.DataOutputStream.
+using net.sourceforge.progress.io.IOException.
using javax.jms.*.
using java.util.Iterator.
+using java.util.Map.
using net.sourceforge.progress.jms.provider.stomp.StompFrame.
class net.sourceforge.progress.jms.provider.stomp.StompFrame :
-
- define static public property COMMAND_CLIENT_SEND as character no-undo initial 'SEND':u
+
+ define protected property frameCommand as character no-undo
get.
-
- define static public property COMMAND_CLIENT_SUBSCRIBE as character no-undo initial 'SUBSCRIBE':u
- get.
-
- define static public property COMMAND_CLIENT_UNSUBSCRIBE as character no-undo initial 'UNSUBSCRIBE':u
- get.
+ set.
- define static public property COMMAND_CLIENT_BEGIN as character no-undo initial 'BEGIN':u
+ define protected property frameBody as memptr no-undo
get.
+ set.
- define static public property COMMAND_CLIENT_COMMIT as character no-undo initial 'COMMIT':u
+ define protected property frameHeader as StringHashMap no-undo
get.
-
- define static public property COMMAND_CLIENT_ABORT as character no-undo initial 'ABORT':u
- get.
+ set.
- define static public property COMMAND_CLIENT_ACK as character no-undo initial 'ACK':u
+ define protected property internalHeader as logical no-undo
get.
-
- define static public property COMMAND_CLIENT_DISCONNECT as character no-undo initial 'DISCONNECT':u
- get.
-
- define static public property COMMAND_SERVER_MESSAGE as character no-undo initial 'MESSAGE':u
- get.
-
- define static public property COMMAND_SERVER_RECEIPT as character no-undo initial 'RECEIPT':u
- get.
-
- define static public property COMMAND_SERVER_ERROR as character no-undo initial 'ERROR':u
- get.
-
- define public property frameType as character no-undo
- get.
set.
- define protected property frameBody as memptr no-undo
- get.
- private set.
-
- define protected property headerMap as StringHashMap no-undo
- get.
- private set.
-
constructor public StompFrame ( ):
end constructor.
- constructor public StompFrame ( frmType as character ):
- frameType = frmType.
+ constructor public StompFrame ( frameCommand as character ):
+ this-object(frameCommand, ?).
end constructor.
- constructor public StompFrame ( frmType as character, frmBody as character ):
- this-object(frmType).
- setBody(frmBody).
+ constructor public StompFrame ( frameCommand as character, frameHeader as Map):
+ setCommand(frameCommand).
+ if valid-object(frameHeader) then
+ setHeader(frameHeader).
end constructor.
- constructor public StompFrame ( frmType as character, frmBody as longchar ):
- this-object(frmType).
- setBody(frmBody).
+ constructor public StompFrame ( frameCommand as character, frameHeader as Map, frameBody as memptr ):
+ this-object(frameCommand, frameHeader).
+ setContent(frameBody).
end constructor.
- constructor public StompFrame ( frmType as character, frmBody as memptr ):
- this-object(frmType).
- setBody(frmBody).
+ constructor public StompFrame ( frameCommand as character, frameHeader as Map, frameBody as longchar ):
+ this-object(frameCommand, frameHeader).
+ setContent(frameBody).
end constructor.
- method public memptr getBody ():
+ constructor public StompFrame ( frameCommand as character, frameHeader as Map, frameBody as character ):
+ this-object(frameCommand, frameHeader).
+ setContent(frameBody).
+ end constructor.
+
+ method public character getCommand ():
+ return frameCommand.
+ end method.
+
+ method public memptr getContent ():
return frameBody.
end method.
method public character getHeader (name as character):
- if valid-object(headerMap) then
- return headerMap:get(name):toString().
+ if valid-object(frameHeader) then
+ return frameHeader:get(name):toString().
catch e as Progress.Lang.Error :
delete object e.
@@ -119,109 +106,89 @@
end method.
method public java.util.Iterator getHeaderNames( ):
- return headerMap:keySet():iterator().
+ return frameHeader:keySet():iterator().
catch e as Progress.Lang.Error :
delete object e.
+ return net.sourceforge.progress.util.Collections:EMPTY_ITERATOR.
end catch.
end method.
-
- method static public StompFrame jmsToStomp (jms as javax.jms.Message):
- define variable sFrame as StompFrame no-undo.
- define variable byteMessage as BytesMessage no-undo.
- define variable it as Iterator no-undo.
- define variable len as int64 no-undo.
- define variable msgBody as memptr no-undo.
- define variable propName as character no-undo.
-
- if valid-object(jms) then
- do:
- sFrame = new StompFrame (StompFrame:COMMAND_CLIENT_SEND).
-
- /* message header */
- sFrame:setHeader('correlation-id':u, jms:getJMSCorrelationID()).
- sFrame:setHeader('expires':u, jms:getJMSExpiration()).
- sFrame:setHeader('persistent':u, jms:getJMSDeliveryMode() eq DeliveryMode:PERSISTENT).
- sFrame:setHeader('priority':u, jms:getJMSPriority()).
- if valid-object(jms:getJMSReplyTo()) then
- sFrame:setHeader('reply-to':u, jms:getJMSReplyTo():toString()).
- sFrame:setHeader('type':u, jms:getJMSType()).
-
- /* stream message properties in header section */
- do on error undo, leave:
- it = jms:getPropertyNames().
-
- do while it:hasNext():
- propName = it:next():toString().
- sFrame:setHeader(propName, jms:getObjectProperty(propName):toString()).
- end.
-
- catch e as Progress.Lang.Error :
- delete object e.
- end catch.
- finally:
- delete object it no-error.
- end finally.
- end.
-
- /* message body */
- if type-of(jms, 'BytesMessage':u) then
- do:
- assign
- byteMessage = cast(jms, 'BytesMessage':u)
- len = byteMessage:getBodyLength().
- if len gt 0 then
- do:
- set-size(msgBody) = len.
- byteMessage:readBytes(msgBody).
- sFrame:setBody(msgBody).
- set-size(msgBody) = 0.
- end.
- end.
- if type-of(jms, 'TextMessage':u) then
- sFrame:setBody(cast(jms, 'TextMessage':u):getText()).
- end.
- return sFrame.
-
- finally:
- set-size(msgBody) = 0.
- end finally.
+
+ method public java.util.Map getHeaders( ):
+ if valid-object(frameHeader) then
+ return frameHeader.
+ return net.sourceforge.progress.util.Collections:EMPTY_MAP.
end method.
- method public void setBody (body as character):
+ method public logical headerExists( input name as character ):
+ if valid-object(frameHeader) then
+ return frameHeader:containsKey(name).
+
+ return false.
+ end method.
+
+ method public void setCommand (command as character):
+ frameCommand = command.
+ end method.
+
+ method public void setContent (content as character):
define variable str as longchar no-undo.
- str = body.
- setBody(str).
+ str = content.
+ setContent(str).
end method.
- method public void setBody (body as longchar):
- copy-lob body to frameBody convert target codepage 'utf-8':u.
+ method public void setContent (content as longchar):
+ copy-lob content to frameBody convert target codepage 'utf-8':u.
- catch e as Progress.Lang.SysError :
- delete object e.
- undo, throw new net.sourceforge.progress.io.IOException().
+ catch e as Progress.Lang.Error :
+ undo, throw new IOException(e).
end catch.
end method.
- method public void setBody (body as memptr):
- copy-lob body to frameBody convert target codepage 'utf-8':u.
+ method public void setContent (content as memptr):
+ copy-lob content to frameBody convert target codepage 'utf-8':u.
- catch e as Progress.Lang.SysError :
- delete object e.
- undo, throw new net.sourceforge.progress.io.IOException().
+ catch e as Progress.Lang.Error :
+ undo, throw new IOException(e).
end catch.
end method.
+ method public void setHeader (frameHeader as Map):
+
+ if valid-object(frameHeader) then
+ do:
+ if valid-object(this-object:frameHeader) and internalHeader then
+ do:
+ this-object:frameHeader:delete().
+ delete object this-object:frameHeader.
+ end.
+
+ if type-of(frameHeader, 'StringHashMap':u) then
+ assign
+ internalHeader = false
+ this-object:frameHeader = cast(frameHeader, 'StringHashMap':u).
+ else
+ assign
+ internalHeader = true
+ this-object:frameHeader = new StringHashMap(frameHeader).
+ end.
+ catch e as Progress.Lang.Error :
+ undo, throw new IOException(e).
+ end catch.
+ end method.
+
method public void setHeader (name as character, val as character):
- if not valid-object(headerMap) then
- headerMap = new StringHashMap().
+ if not valid-object(frameHeader) then
+ assign
+ internalHeader = true
+ frameHeader = new StringHashMap().
- headerMap:put(name, new String(val) ).
+ frameHeader:put(name, new String(val) ).
catch e as Progress.Lang.Error :
- delete object e.
+ undo, throw new IOException(e).
end catch.
end method.
@@ -241,14 +208,11 @@
setHeader(name, string(val)).
end method.
- method static public javax.jms.Message stompToJms (sFrame as StompFrame):
- end method.
-
destructor public StompFrame ( ):
- if valid-object(headerMap) then
+ if valid-object(frameHeader) and internalHeader then
do:
- headerMap:delete().
- delete object headerMap.
+ frameHeader:delete().
+ delete object frameHeader.
end.
end destructor.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <me...@us...> - 2011-07-05 09:09:14
|
Revision: 99
http://progress-jms.svn.sourceforge.net/progress-jms/?rev=99&view=rev
Author: medu
Date: 2011-07-05 09:09:08 +0000 (Tue, 05 Jul 2011)
Log Message:
-----------
update connection, topic connection (single session)
Modified Paths:
--------------
net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/provider/stomp/Connection.cls
net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/provider/stomp/TopicConnection.cls
net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/provider/stomp/TopicConnectionFactory.cls
Modified: net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/provider/stomp/Connection.cls
===================================================================
--- net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/provider/stomp/Connection.cls 2011-07-05 09:06:01 UTC (rev 98)
+++ net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/provider/stomp/Connection.cls 2011-07-05 09:09:08 UTC (rev 99)
@@ -23,25 +23,49 @@
----------------------------------------------------------------------*/
-using net.sourceforge.progress.jms.*.
+
+using net.sourceforge.progress.jms.provider.stomp.*.
+using net.sourceforge.progress.jms.JMSException.
using net.sourceforge.progress.net.Socket.
-using net.sourceforge.progress.jms.provider.stomp.*.
+
class net.sourceforge.progress.jms.provider.stomp.Connection
- inherits AbstractConnection
- implements net.sourceforge.progress.net.ReadResponseHandler:
+ inherits net.sourceforge.progress.jms.Connection
+ implements net.sourceforge.progress.net.ReadResponseSubscriber:
- define private variable connectionFactory as ConnectionFactory no-undo.
- define private variable stompSocket as Socket no-undo.
-
+ define protected property connectionFactory as ConnectionFactory no-undo
+ get.
+ private set.
+
+ define protected property userName as character no-undo
+ get.
+ private set.
+
+ define protected property userPasswd as character no-undo
+ get.
+ private set.
+
+ define protected property stompSocket as Socket no-undo
+ get.
+ private set.
+
+ define protected property connectionSession as Session no-undo
+ get.
+ private set.
+
constructor public Connection ( factory as ConnectionFactory ):
this-object(factory, ?, ?).
end constructor.
constructor public Connection ( factory as ConnectionFactory,
userName as character, userPasswd as character):
- super().
- connectionFactory = factory.
+
+ super().
+
+ assign
+ connectionFactory = factory
+ this-object:userName = userName
+ this-object:userPasswd = userPasswd.
end constructor.
/*------------------------------------------------------------------------------
@@ -53,10 +77,24 @@
delete object stompSocket.
end method.
-
/*------------------------------------------------------------------------------
- Purpose: Gets the metadata for this connection.
- ------------------------------------------------------------------------------*/
+ Purpose: Creates a Session object.
+ ------------------------------------------------------------------------------*/
+ method override public javax.jms.Session createSession
+ ( transacted as logical, acknowledgeMode as integer ):
+ if not isActive then
+ undo, throw new JMSException().
+
+ if not valid-object(connectionSession) then
+ connectionSession = new Session(this-object, transacted, acknowledgeMode).
+
+ return connectionSession.
+ end method.
+
+
+ /*------------------------------------------------------------------------------
+ Purpose: Gets the metadata for this connection.
+ ------------------------------------------------------------------------------*/
method override public javax.jms.ConnectionMetaData getMetaData():
if not valid-object(metaData) then
metaData = new net.sourceforge.progress.jms.provider.stomp.ConnectionMetaData ().
@@ -66,7 +104,7 @@
/*------------------------------------------------------------------------------
Purpose: Handle read-response events of the underlying socket.
------------------------------------------------------------------------------*/
- method public void handleReadResponse( input sock as net.sourceforge.progress.net.Socket ):
+ method public void onReadResponse( input sock as net.sourceforge.progress.net.Socket ):
/* connection is stoped */
if not isActive then
@@ -87,22 +125,14 @@
if not hadActivity then
do on error undo, leave:
stompSocket = new Socket(connectionFactory:serverHost, connectionFactory:serverPort).
- stompSocket:setReadResponseHandler(this-object).
+ stompSocket:addReadResponseSubscriber(this-object).
catch e as Progress.Lang.Error :
- delete object e.
- undo, throw new JMSException().
+ undo, throw new JMSException(e).
end catch.
end.
super:start().
end method.
- /*------------------------------------------------------------------------------
- Purpose: Temporarily stops a connection's delivery of incoming messages.
- ------------------------------------------------------------------------------*/
- method override public void stop():
- super:stop().
- end method.
-
end class.
\ No newline at end of file
Modified: net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/provider/stomp/TopicConnection.cls
===================================================================
--- net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/provider/stomp/TopicConnection.cls 2011-07-05 09:06:01 UTC (rev 98)
+++ net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/provider/stomp/TopicConnection.cls 2011-07-05 09:09:08 UTC (rev 99)
@@ -23,24 +23,21 @@
----------------------------------------------------------------------*/
using javax.jms.TopicConnection.
-using net.sourceforge.progress.jms.provider.stomp.Connection.
+using net.sourceforge.progress.jms.provider.stomp.*.
-class net.sourceforge.progress.jms.provider.stomp.TopicConnection inherits Connection implements TopicConnection :
+class net.sourceforge.progress.jms.provider.stomp.TopicConnection inherits Connection
+ implements TopicConnection :
+
+ constructor public TopicConnection ( input factory as ConnectionFactory ):
+ super (input factory).
+ end constructor.
-
- constructor public TopicConnection ( serverHost as character, serverPort as character):
- super (serverHost, serverPort).
+ constructor public TopicConnection ( input factory as ConnectionFactory, input userName as character, input userPasswd as character ):
+ super (input factory, input userName, input userPasswd).
end constructor.
-
- constructor public TopicConnection ( serverHost as character, serverPort as character,
- userName as character, userPasswd as character):
- super (serverHost, serverPort, userName, userPasswd).
- end constructor.
method public javax.jms.TopicSession createTopicSession( input transacted as logical, input acknowledgeMode as integer ):
-
- undo, throw new Progress.Lang.AppError("METHOD NOT IMPLEMENTED").
-
+ return new TopicSession(this-object, transacted, acknowledgeMode).
end method.
end class.
\ No newline at end of file
Modified: net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/provider/stomp/TopicConnectionFactory.cls
===================================================================
--- net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/provider/stomp/TopicConnectionFactory.cls 2011-07-05 09:06:01 UTC (rev 98)
+++ net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/provider/stomp/TopicConnectionFactory.cls 2011-07-05 09:09:08 UTC (rev 99)
@@ -9,7 +9,7 @@
----------------------------------------------------------------------*/
using javax.jms.TopicConnectionFactory.
-using net.sourceforge.progress.jms.provider.stomp.ConnectionFactory.
+using net.sourceforge.progress.jms.provider.stomp.*.
class net.sourceforge.progress.jms.provider.stomp.TopicConnectionFactory inherits ConnectionFactory implements TopicConnectionFactory :
@@ -33,13 +33,11 @@
end constructor.
method public javax.jms.TopicConnection createTopicConnection( ):
-
+ return new TopicConnection (this-object).
end method.
method public javax.jms.TopicConnection createTopicConnection( input userName as character, input userPasswd as character ):
-
- undo, throw new Progress.Lang.AppError("METHOD NOT IMPLEMENTED").
-
+ return new TopicConnection (this-object, userName, userPasswd).
end method.
end class.
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <me...@us...> - 2011-07-05 09:06:08
|
Revision: 98
http://progress-jms.svn.sourceforge.net/progress-jms/?rev=98&view=rev
Author: medu
Date: 2011-07-05 09:06:01 +0000 (Tue, 05 Jul 2011)
Log Message:
-----------
added missing object implementation for stomp
Added Paths:
-----------
net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/provider/stomp/MessageConsumer.cls
net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/provider/stomp/MessageProducer.cls
net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/provider/stomp/QueueConnection.cls
net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/provider/stomp/QueueReceiver.cls
net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/provider/stomp/QueueSender.cls
net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/provider/stomp/QueueSession.cls
net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/provider/stomp/Session.cls
net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/provider/stomp/StompWire.cls
net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/provider/stomp/StompWireFormat.cls
net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/provider/stomp/TopicPublisher.cls
net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/provider/stomp/TopicSession.cls
net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/provider/stomp/TopicSubscriber.cls
Added: net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/provider/stomp/MessageConsumer.cls
===================================================================
--- net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/provider/stomp/MessageConsumer.cls (rev 0)
+++ net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/provider/stomp/MessageConsumer.cls 2011-07-05 09:06:01 UTC (rev 98)
@@ -0,0 +1,56 @@
+/*------------------------------------------------------------------------
+ File : MessageConsumer
+ Purpose :
+ Syntax :
+ Description : A client uses a MessageConsumer object to receive
+ messages from a destination. A MessageConsumer object is
+ created by passing a Destination object to a
+ message-consumer creation method supplied by a session.
+
+ Author(s) : Marian Edu
+ Created : Fri Nov 05 14:56:55 EET 2010
+ Notes :
+
+ Email : mar...@gm...
+ Website : www.ganimede.ro
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the Lesser GNU 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 program 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
+ Lesser GNU General Public License for more details.
+ You should have received a copy of the Lesser GNU General Public License
+ along with this program. If not, see < http://www.gnu.org/licenses/>.
+
+ ----------------------------------------------------------------------*/
+
+using net.sourceforge.progress.jms.provider.stomp.Session.
+using javax.jms.Destination.
+
+routine-level on error undo, throw.
+
+class net.sourceforge.progress.jms.provider.stomp.MessageConsumer
+ inherits net.sourceforge.progress.jms.MessageConsumer :
+
+ constructor protected MessageConsumer ( input jmsSession as Session, input destination as Destination, input selector as character ):
+ super (input jmsSession, input destination, input selector).
+ end constructor.
+
+ constructor protected MessageConsumer ( input jmsSession as Session, input destination as Destination ):
+ super (input jmsSession, input destination).
+ end constructor.
+
+ method override public void close( ):
+ super:close().
+ end method.
+
+ method override public javax.jms.Message receive( input timeout as int64 ):
+ end method.
+
+ method override public javax.jms.Message receiveNoWait( ):
+ end method.
+
+end class.
\ No newline at end of file
Added: net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/provider/stomp/MessageProducer.cls
===================================================================
--- net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/provider/stomp/MessageProducer.cls (rev 0)
+++ net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/provider/stomp/MessageProducer.cls 2011-07-05 09:06:01 UTC (rev 98)
@@ -0,0 +1,46 @@
+ /*------------------------------------------------------------------------
+ File : MessageProducer
+ Purpose :
+ Syntax :
+ Description : A client uses a MessageProducer object to send messages
+ to a destination. A MessageProducer object is created
+ by passing a Destination object to a message-producer
+ creation method supplied by a session.
+ Author(s) : Marian Edu
+ Created : Fri Nov 05 15:34:08 EET 2010
+ Notes :
+
+ Email : mar...@gm...
+ Website : www.ganimede.ro
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the Lesser GNU 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 program 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
+ Lesser GNU General Public License for more details.
+ You should have received a copy of the Lesser GNU General Public License
+ along with this program. If not, see < http://www.gnu.org/licenses/>.
+
+ ----------------------------------------------------------------------*/
+using javax.jms.Destination.
+using javax.jms.Message.
+using net.sourceforge.progress.jms.MessageProducer.
+using net.sourceforge.progress.jms.provider.stomp.Session.
+
+routine-level on error undo, throw.
+
+class net.sourceforge.progress.jms.provider.stomp.MessageProducer inherits MessageProducer :
+
+
+ constructor protected MessageProducer ( input jmsSession as Session, input destination as Destination ):
+ super (input jmsSession, input destination).
+ end constructor.
+
+ method override public void send( input destination as Destination, input msg as Message, input deliveryMode as integer, input priority as integer, input timeToLive as int64 ):
+
+ end method.
+
+end class.
\ No newline at end of file
Added: net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/provider/stomp/QueueConnection.cls
===================================================================
--- net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/provider/stomp/QueueConnection.cls (rev 0)
+++ net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/provider/stomp/QueueConnection.cls 2011-07-05 09:06:01 UTC (rev 98)
@@ -0,0 +1,43 @@
+/*------------------------------------------------------------------------
+ File : QueueConnection
+ Purpose :
+ Syntax :
+ Description :
+ Author(s) : Marian Edu
+ Created : Mon Jan 04 21:28:47 EET 2010
+ Notes :
+
+ Email : mar...@gm...
+ Website : www.ganimede.ro
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the Lesser GNU 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 program 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
+ Lesser GNU General Public License for more details.
+ You should have received a copy of the Lesser GNU General Public License
+ along with this program. If not, see < http://www.gnu.org/licenses/>.
+ ----------------------------------------------------------------------*/
+
+using javax.jms.QueueConnection.
+using net.sourceforge.progress.jms.provider.stomp.*.
+
+class net.sourceforge.progress.jms.provider.stomp.QueueConnection inherits Connection
+ implements QueueConnection :
+
+ constructor public QueueConnection ( input factory as ConnectionFactory ):
+ super (input factory).
+ end constructor.
+
+ constructor public QueueConnection ( input factory as ConnectionFactory, input userName as character, input userPasswd as character ):
+ super (input factory, input userName, input userPasswd).
+ end constructor.
+
+ method public javax.jms.QueueSession createQueueSession( input transacted as logical, input acknowledgeMode as integer ):
+ return new QueueSession(this-object, transacted, acknowledgeMode).
+ end method.
+
+end class.
\ No newline at end of file
Added: net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/provider/stomp/QueueReceiver.cls
===================================================================
--- net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/provider/stomp/QueueReceiver.cls (rev 0)
+++ net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/provider/stomp/QueueReceiver.cls 2011-07-05 09:06:01 UTC (rev 98)
@@ -0,0 +1,49 @@
+/*------------------------------------------------------------------------
+ File : QueueReceiver
+ Purpose :
+ Syntax :
+ Description : A client uses a QueueReceiver object to receive messages
+ that have been delivered to a queue.
+ Author(s) : Marian Edu
+ Created : Fri Nov 05 14:49:58 EET 2010
+ Notes :
+
+ Email : mar...@gm...
+ Website : www.ganimede.ro
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the Lesser GNU 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 program 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
+ Lesser GNU General Public License for more details.
+ You should have received a copy of the Lesser GNU General Public License
+ along with this program. If not, see < http://www.gnu.org/licenses/>.
+
+ ----------------------------------------------------------------------*/
+
+using javax.jms.Destination.
+using javax.jms.Queue.
+using net.sourceforge.progress.jms.provider.stomp.*.
+
+routine-level on error undo, throw.
+
+class net.sourceforge.progress.jms.provider.stomp.QueueReceiver
+ inherits net.sourceforge.progress.jms.provider.stomp.MessageConsumer
+ implements javax.jms.QueueReceiver :
+
+ constructor public QueueReceiver ( input jmsSession as Session, input destination as Queue, input selector as character ):
+ super (input jmsSession, input cast(destination, 'Destination':u), input selector).
+ end constructor.
+
+ constructor public QueueReceiver ( input jmsSession as Session, input destination as Queue ):
+ super (input jmsSession, input cast(destination, 'Destination':u)).
+ end constructor.
+
+ method public javax.jms.Queue getQueue( ):
+ return cast(destination, 'javax.jms.Queue':u).
+ end method.
+
+end class.
\ No newline at end of file
Added: net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/provider/stomp/QueueSender.cls
===================================================================
--- net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/provider/stomp/QueueSender.cls (rev 0)
+++ net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/provider/stomp/QueueSender.cls 2011-07-05 09:06:01 UTC (rev 98)
@@ -0,0 +1,54 @@
+/*------------------------------------------------------------------------
+ File : QueueSender
+ Purpose :
+ Syntax :
+ Description : A client uses a QueueSender object to receive messages
+ that have been delivered to a queue.
+ Author(s) : Marian Edu
+ Created : Fri Nov 05 13:29:13 EET 2010
+ Notes :
+
+ Email : mar...@gm...
+ Website : www.ganimede.ro
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the Lesser GNU 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 program 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
+ Lesser GNU General Public License for more details.
+ You should have received a copy of the Lesser GNU General Public License
+ along with this program. If not, see < http://www.gnu.org/licenses/>.
+
+ ----------------------------------------------------------------------*/
+
+using javax.jms.Destination.
+using javax.jms.Message.
+using javax.jms.Queue.
+using net.sourceforge.progress.jms.provider.stomp.*.
+
+routine-level on error undo, throw.
+
+class net.sourceforge.progress.jms.provider.stomp.QueueSender
+ inherits MessageProducer implements javax.jms.QueueSender :
+
+ constructor public QueueSender ( input jmsSession as Session, input queue as Queue ):
+ super (input jmsSession, input cast(queue, 'Destination')).
+ end constructor.
+
+ method public javax.jms.Queue getQueue( ):
+ return cast(destination, 'javax.jms.Queue':u).
+ end method.
+
+ method public void send( input queue as javax.jms.Queue, input msg as Message ):
+ this-object:send (queue, msg, deliveryMode, priority, timeToLive).
+ end method.
+
+ method public void send( input Queue as javax.jms.Queue, input msg as Message, input deliveryMode as integer, input priority as integer, input timeToLive as int64 ):
+ if type-of(queue, 'Destination':u) then
+ this-object:send (cast(queue, 'Destination':u), msg, deliveryMode, priority, timeToLive).
+ end method.
+
+end class.
\ No newline at end of file
Added: net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/provider/stomp/QueueSession.cls
===================================================================
--- net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/provider/stomp/QueueSession.cls (rev 0)
+++ net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/provider/stomp/QueueSession.cls 2011-07-05 09:06:01 UTC (rev 98)
@@ -0,0 +1,50 @@
+/*------------------------------------------------------------------------
+ File : QueueSession
+ Purpose :
+ Syntax :
+ Description :
+ Author(s) : Marian Edu
+ Created : Mon Jan 04 21:45:46 EET 2010
+ Notes :
+
+ Email : mar...@gm...
+ Website : www.ganimede.ro
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the Lesser GNU 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 program 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
+ Lesser GNU General Public License for more details.
+ You should have received a copy of the Lesser GNU General Public License
+ along with this program. If not, see < http://www.gnu.org/licenses/>.
+
+ ----------------------------------------------------------------------*/
+
+using Progress.Lang.*.
+using javax.jms.QueueSession.
+using net.sourceforge.progress.jms.provider.stomp.*.
+
+routine-level on error undo, throw.
+
+class net.sourceforge.progress.jms.provider.stomp.QueueSession inherits Session implements QueueSession :
+
+ constructor public QueueSession ( input conn as Connection, input isTransacted as logical, input ackMode as integer ):
+ super (input conn, input isTransacted, input ackMode).
+ end constructor.
+
+ method public javax.jms.QueueReceiver createReceiver( input queue as javax.jms.Queue ):
+ return new QueueReceiver (this-object, queue).
+ end method.
+
+ method public javax.jms.QueueReceiver createReceiver( input queue as javax.jms.Queue, input messageSelector as character ):
+ return new QueueReceiver (this-object, queue, messageSelector).
+ end method.
+
+ method public javax.jms.QueueSender createSender( input queue as javax.jms.Queue ):
+ return new QueueSender (this-object, queue).
+ end method.
+
+end class.
\ No newline at end of file
Added: net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/provider/stomp/Session.cls
===================================================================
--- net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/provider/stomp/Session.cls (rev 0)
+++ net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/provider/stomp/Session.cls 2011-07-05 09:06:01 UTC (rev 98)
@@ -0,0 +1,38 @@
+/*------------------------------------------------------------------------
+ File : Session
+ Purpose :
+ Syntax :
+ Description :
+ Author(s) : Marian Edu
+ Created : Mon Jan 04 21:42:20 EET 2010
+ Notes :
+
+ Email : mar...@gm...
+ Website : www.ganimede.ro
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the Lesser GNU 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 program 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
+ Lesser GNU General Public License for more details.
+ You should have received a copy of the Lesser GNU General Public License
+ along with this program. If not, see < http://www.gnu.org/licenses/>.
+
+ ----------------------------------------------------------------------*/
+using net.sourceforge.progress.jms.provider.stomp.Connection.
+using net.sourceforge.progress.jms.Session.
+using javax.jms.*.
+
+class net.sourceforge.progress.jms.provider.stomp.Session
+ inherits Session :
+
+ constructor public Session ( conn as Connection, isTransacted as logical, ackMode as integer ):
+ super(conn, isTransacted, ackMode).
+ end constructor.
+
+
+
+end class.
\ No newline at end of file
Added: net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/provider/stomp/StompWire.cls
===================================================================
--- net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/provider/stomp/StompWire.cls (rev 0)
+++ net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/provider/stomp/StompWire.cls 2011-07-05 09:06:01 UTC (rev 98)
@@ -0,0 +1,306 @@
+/*------------------------------------------------------------------------
+ File : StompWireFormat
+ Purpose :
+ Syntax :
+ Description : Stomp provides an interoperable wire format so that any
+ of the available Stomp Clients can communicate with any
+ Stomp Message Broker to provide easy and widespread
+ messaging interop among languages, platforms and brokers.
+
+ The protocol is using frames as message serialization
+ object. There are a number of different types of frames
+ that can be used but all have a frame type description, a
+ header section and optionally a body which can be text or
+ binary.
+
+ Author(s) : Marian Edu
+ Created : Thu Sep 30 19:49:38 EEST 2010
+ Notes :
+
+ Email : mar...@gm...
+ Website : www.ganimede.ro
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the Lesser GNU 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 program 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
+ Lesser GNU General Public License for more details.
+ You should have received a copy of the Lesser GNU General Public License
+ along with this program. If not, see < http://www.gnu.org/licenses/>.
+
+ ----------------------------------------------------------------------*/
+
+using net.sourceforge.progress.util.StringHashMap.
+using net.sourceforge.progress.lang.String.
+using net.sourceforge.progress.io.InputStream.
+using net.sourceforge.progress.io.OutputStream.
+using net.sourceforge.progress.io.DataInputStream.
+using net.sourceforge.progress.io.DataOutputStream.
+using javax.jms.*.
+using java.util.Iterator.
+using net.sourceforge.progress.jms.provider.stomp.StompFrame.
+
+
+class net.sourceforge.progress.jms.provider.stomp.StompWire :
+
+ define static public property COMMAND_CLIENT_CONNECT as character no-undo initial 'CONNECT':u
+ get.
+
+ define static public property COMMAND_CLIENT_SEND as character no-undo initial 'SEND':u
+ get.
+
+ define static public property COMMAND_CLIENT_SUBSCRIBE as character no-undo initial 'SUBSCRIBE':u
+ get.
+
+ define static public property COMMAND_CLIENT_UNSUBSCRIBE as character no-undo initial 'UNSUBSCRIBE':u
+ get.
+
+ define static public property COMMAND_CLIENT_BEGIN as character no-undo initial 'BEGIN':u
+ get.
+
+ define static public property COMMAND_CLIENT_COMMIT as character no-undo initial 'COMMIT':u
+ get.
+
+ define static public property COMMAND_CLIENT_ABORT as character no-undo initial 'ABORT':u
+ get.
+
+ define static public property COMMAND_CLIENT_ACK as character no-undo initial 'ACK':u
+ get.
+
+ define static public property COMMAND_CLIENT_DISCONNECT as character no-undo initial 'DISCONNECT':u
+ get.
+
+ define static public property COMMAND_SERVER_CONNECTED as character no-undo initial 'CONNECTED':u
+ get.
+
+ define static public property COMMAND_SERVER_MESSAGE as character no-undo initial 'MESSAGE':u
+ get.
+
+ define static public property COMMAND_SERVER_RECEIPT as character no-undo initial 'RECEIPT':u
+ get.
+
+ define static public property COMMAND_SERVER_ERROR as character no-undo initial 'ERROR':u
+ get.
+
+ define static public property HEADER_CONTENT_LENGTH as character no-undo initial 'content-length':u
+ get.
+
+ define static public property LINE_SEPARATOR as character no-undo initial '~r~n':u
+ get.
+
+
+ method static public StompFrame jmsToStomp (jms as javax.jms.Message):
+ define variable sFrame as StompFrame no-undo.
+ define variable byteMessage as BytesMessage no-undo.
+ define variable it as Iterator no-undo.
+ define variable len as int64 no-undo.
+ define variable msgBody as memptr no-undo.
+ define variable propName as character no-undo.
+
+ if valid-object(jms) then
+ do:
+ sFrame = new StompFrame (COMMAND_CLIENT_SEND).
+
+ /* message header */
+ sFrame:setHeader('correlation-id':u, jms:getJMSCorrelationID()).
+ sFrame:setHeader('expires':u, jms:getJMSExpiration()).
+ sFrame:setHeader('persistent':u, jms:getJMSDeliveryMode() eq DeliveryMode:PERSISTENT).
+ sFrame:setHeader('priority':u, jms:getJMSPriority()).
+ if valid-object(jms:getJMSReplyTo()) then
+ sFrame:setHeader('reply-to':u, jms:getJMSReplyTo():toString()).
+ sFrame:setHeader('type':u, jms:getJMSType()).
+
+ /* stream message properties in header section */
+ do on error undo, leave:
+ it = jms:getPropertyNames().
+
+ do while it:hasNext():
+ propName = it:next():toString().
+ sFrame:setHeader(propName, jms:getObjectProperty(propName):toString()).
+ end.
+
+ catch e as Progress.Lang.Error :
+ delete object e.
+ end catch.
+ finally:
+ delete object it no-error.
+ end finally.
+ end.
+
+ /* message body */
+ if type-of(jms, 'BytesMessage':u) then
+ do:
+ assign
+ byteMessage = cast(jms, 'BytesMessage':u)
+ len = byteMessage:getBodyLength().
+ if len gt 0 then
+ do:
+ sFrame:setHeader(HEADER_CONTENT_LENGTH, len).
+ set-size(msgBody) = len.
+ byteMessage:readBytes(msgBody).
+ sFrame:setContent(msgBody).
+ set-size(msgBody) = 0.
+ end.
+ end.
+ if type-of(jms, 'TextMessage':u) then
+ sFrame:setContent(cast(jms, 'TextMessage':u):getText()).
+ end.
+ return sFrame.
+
+ finally:
+ set-size(msgBody) = 0.
+ end finally.
+ end method.
+
+ method static public javax.jms.Message stompToJms (sFrame as StompFrame, sess as javax.jms.Session):
+ define variable jms as Message no-undo.
+ define variable it as Iterator no-undo.
+ define variable len as int64 no-undo.
+ define variable msgBody as memptr no-undo.
+ define variable propName as character no-undo.
+
+ if valid-object(sFrame) then
+ do:
+ msgBody = sFrame:getContent().
+ if sFrame:getHeader(HEADER_CONTENT_LENGTH) ne ? and get-size(msgBody) gt 0 then
+ do:
+ jms = new net.sourceforge.progress.jms.BytesMessage (sess).
+ cast(jms, 'BytesMessage':u):writeBytes(msgBody).
+ end.
+ else
+ do:
+ jms = new net.sourceforge.progress.jms.TextMessage(sess).
+ cast(jms, 'TextMessage':u):setText(get-string(msgBody, 1)).
+ end.
+
+ /* message header */
+ if sFrame:headerExists('correlation-id':u) then
+ jms:setJMSCorrelationID(sFrame:getHeader('correlation-id':u)).
+ if sFrame:headerExists('expires':u) then
+ jms:setJMSExpiration(integer(sFrame:getHeader('expires':u))).
+
+ jms:setJMSDeliveryMode(if sFrame:headerExists('persistent':u) then
+ DeliveryMode:PERSISTENT
+ else
+ DeliveryMode:NON_PERSISTENT).
+
+ if sFrame:headerExists('priority':u) then
+ jms:setJMSPriority(integer(sFrame:getHeader('priority':u))).
+
+ if sFrame:headerExists('type':u) then
+ jms:setJMSType(sFrame:getHeader('type':u)).
+
+ /*
+ if sFrame:headerExists('reply-to':u) then
+ jms:setJMSReplyTo(sFrame:getHeader('reply-to':u)).
+ */
+
+ /* stream message properties in header section */
+ do on error undo, leave:
+ it = sFrame:getHeaderNames().
+
+ do while it:hasNext():
+ propName = it:next():toString().
+ jms:setStringProperty(propName, sFrame:getHeader(propName)).
+ end.
+
+ catch e as Progress.Lang.Error :
+ delete object e.
+ end catch.
+ finally:
+ delete object it no-error.
+ end finally.
+ end.
+
+ end.
+ return jms.
+
+ finally:
+ set-size(msgBody) = 0.
+ end finally.
+ end method.
+
+ method static public logical writeFrame (sFrame as StompFrame, outStream as OutputStream):
+ define variable dataOut as DataOutputStream no-undo.
+ define variable it as Iterator no-undo.
+ define variable propName as character no-undo.
+ define variable frmBody as memptr no-undo.
+
+ if valid-object(sFrame) and valid-object (outStream) then
+ do on error undo, leave:
+ dataOut = new DataOutputStream(outStream).
+ /* write frame command */
+ dataOut:writeChars(sFrame:getCommand() + LINE_SEPARATOR).
+ /* write frame header */
+ do on error undo, leave:
+ it = sFrame:getHeaderNames().
+
+ do while it:hasNext():
+ propName = it:next():toString().
+ dataOut:writeChars(substitute('&1:&2&3':u, propName,
+ sFrame:getHeader(propName), LINE_SEPARATOR)).
+ end.
+
+ catch e as Progress.Lang.Error :
+ delete object e.
+ end catch.
+ finally:
+ delete object it no-error.
+ end finally.
+ end.
+ /* write end of header */
+ dataOut:writeChars(LINE_SEPARATOR).
+
+ /* write frame body */
+ frmBody = sFrame:getContent().
+ dataOut:write(frmBody).
+
+ /* write end of frame */
+ dataOut:write(0).
+
+ return true.
+
+ finally:
+ set-size(frmBody) = 0.
+ delete object dataOut no-error.
+ end finally.
+ end.
+ return false.
+
+ end method.
+
+ method static public StompFrame readFrame (inStream as InputStream):
+ define variable sFrame as StompFrame no-undo.
+ define variable dataIn as DataInputStream no-undo.
+ define variable bodyLen as integer no-undo.
+ define variable frmBody as memptr no-undo.
+
+ if valid-object (inStream) then
+ do on error undo, leave:
+ dataIn = new DataInputStream(inStream).
+ /* read frame command */
+ sFrame = new StompFrame(dataIn:readLineAsCharacter()).
+ /* read frame header */
+
+ /* write end of header */
+
+
+ /* read frame body */
+
+
+ /* write end of frame */
+
+ return sFrame.
+
+ finally:
+ set-size(frmBody) = 0.
+ delete object dataIn no-error.
+ end finally.
+ end.
+ return ?.
+ end method.
+
+end class.
\ No newline at end of file
Added: net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/provider/stomp/StompWireFormat.cls
===================================================================
--- net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/provider/stomp/StompWireFormat.cls (rev 0)
+++ net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/provider/stomp/StompWireFormat.cls 2011-07-05 09:06:01 UTC (rev 98)
@@ -0,0 +1,252 @@
+/*------------------------------------------------------------------------
+ File : StompWireFormat
+ Purpose :
+ Syntax :
+ Description : Marshal messages in Stomp protocol packets.
+ Author(s) : Marian Edu
+ Created : Mon Nov 15 19:19:26 EET 2010
+ Notes :
+
+ Email : mar...@gm...
+ Website : www.ganimede.ro
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the Lesser GNU 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 program 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
+ Lesser GNU General Public License for more details.
+ You should have received a copy of the Lesser GNU General Public License
+ along with this program. If not, see < http://www.gnu.org/licenses/>.
+
+ ----------------------------------------------------------------------*/
+
+using javax.jms.Message.
+using java.util.Iterator.
+using java.util.Map.Entry.
+using net.sourceforge.progress.io.*.
+using net.sourceforge.progress.lang.*.
+using net.sourceforge.progress.util.StringHashMap.
+using net.sourceforge.progress.jms.provider.stomp.*.
+using net.sourceforge.progress.jms.provider.stomp.protocol.*.
+using net.sourceforge.progress.jms.WireFormat.
+
+routine-level on error undo, throw.
+
+class net.sourceforge.progress.jms.provider.stomp.StompWireFormat implements WireFormat :
+
+ define protected property versionNum as integer no-undo initial 1
+ get.
+ set.
+
+ define private static property MAX_DATA_LENGTH as integer no-undo initial 104857600
+ get.
+
+ define private static property instance as StompWireFormat no-undo
+ get.
+ set.
+
+ constructor private StompWireFormat():
+ end constructor.
+
+ method public static StompWireFormat getInstance ():
+ if not valid-object(instance) then
+ instance = new StompWireFormat().
+ return instance.
+ end method.
+
+ method public integer getVersion( ):
+ return versionNum.
+ end method.
+
+ method public memptr marshal( input msg as Progress.Lang.Object ):
+ define variable byteOS as ByteArrayOutputStream no-undo.
+ define variable dataOS as DataOutputStream no-undo.
+ define variable byteArr as memptr no-undo.
+
+ assign
+ byteOS = new ByteArrayOutputStream()
+ dataOS = new DataOutputStream(byteOS).
+
+ marshal(msg, dataOS).
+ dataOS:close().
+
+ byteArr = byteOS:toByteArray().
+
+ return byteArr.
+
+ finally:
+ delete object dataOS no-error.
+ delete object byteOS no-error.
+ end finally.
+
+ end method.
+
+ method public void marshal( input msg as Progress.Lang.Object, input dataOut as java.io.DataOutput ):
+ define variable stompFrame as StompFrame no-undo.
+ define variable jmsMessage as Message no-undo.
+ define variable strBuffer as StringBuffer no-undo.
+ define variable iterator as Iterator no-undo.
+ define variable headerEntry as Entry no-undo.
+ define variable messageHeader as memptr no-undo.
+
+ if not type-of(msg, 'StompFrame':u) then
+ undo, throw new IOException ('Invalid message.').
+
+ assign
+ stompFrame = cast(msg, 'StompFrame':u)
+ iterator = stompFrame:getHeaders():entrySet():iterator()
+ strBuffer = new StringBuffer().
+
+ strBuffer:append(stompFrame:getCommand()).
+ strBuffer:append(Stomp:NEWLINE).
+
+ /* header section */
+ do while valid-object(iterator) and iterator:hasNext():
+ headerEntry = cast(iterator:next(), 'Entry':u).
+ if valid-object(headerEntry) then
+ do:
+ strBuffer:append(headerEntry:getKey():toString()).
+ strBuffer:append(Headers:SEPERATOR).
+ strBuffer:append(headerEntry:getValue():toString()).
+ strBuffer:append(Stomp:NEWLINE).
+ end.
+ end.
+ /* end of header section */
+ strBuffer:append(Stomp:NEWLINE).
+
+ messageHeader = strBuffer:getString():getBytes('utf-8':u).
+
+ dataOut:write(messageHeader).
+ dataOut:write(stompFrame:getContent()).
+ dataOut:write(Stomp:NULL).
+
+ finally:
+ set-size(messageHeader) = 0.
+ delete object strBuffer no-error.
+ delete object iterator no-error.
+ end finally.
+ end method.
+
+ method public Progress.Lang.Object unmarshal( input byteMsg as memptr ):
+ define variable byteIS as ByteArrayInputStream no-undo.
+ define variable dataIS as DataInputStream no-undo.
+
+ assign
+ byteIS = new ByteArrayInputStream(byteMsg)
+ dataIS = new DataInputStream(byteIS).
+
+ return unmarshal(dataIS).
+
+ finally:
+ delete object dataIS no-error.
+ delete object byteIS no-error.
+ end finally.
+
+ end method.
+
+ method public Progress.Lang.Object unmarshal( input dataIn as java.io.DataInput ):
+ define variable msgLine as character no-undo.
+ define variable msgCommand as character no-undo.
+ define variable msgBody as memptr no-undo.
+ define variable msgHead as StringHashMap no-undo.
+ define variable headKey as character no-undo.
+ define variable sepIndex as integer no-undo.
+ define variable bodyBAOS as ByteArrayOutputStream no-undo.
+ define variable bodyByte as integer no-undo.
+ define variable contentLen as integer no-undo initial ?.
+
+ /* message command */
+ repeat while true:
+ msgLine = dataIn:readLineAsCharacter().
+ if msgLine eq ? then
+ undo, throw new IOException('Connection closed').
+ if msgLine ne '':u then
+ do:
+ msgCommand = trim(msgLine).
+ leave.
+ end.
+ end.
+
+ /* header section */
+ msgHead = new StringHashMap().
+
+ repeat while true:
+ assign
+ msgLine = dataIn:readLineAsCharacter()
+ sepIndex = index(msgLine, Headers:SEPERATOR).
+
+ /* end of headers */
+ if msgLine eq ? or msgLine eq '':u then
+ leave.
+
+ /* wrong header */
+ if sepIndex eq ? or sepIndex eq 0 then
+ undo, throw new ProtocolException(substitute('Invalid header line [&1].', msgLine)).
+
+ headKey = substring(msgLine, 1, sepIndex - 1, 'character':u).
+ msgHead:put(headKey,
+ new String(substring(msgLine, sepIndex + 1, - 1, 'character':u))).
+
+ if headKey eq Headers:CONTENT_LENGTH then
+ do:
+ contentLen = integer(substring(msgLine, sepIndex + 1, - 1, 'character':u)) no-error.
+ if error-status:error or error-status:num-messages gt 0 then
+ undo, throw new ProtocolException(substitute('Invalid content-length header [&1].', msgLine)).
+ end.
+ end.
+
+ /* body section */
+ /* client told us the content length */
+ if contentLen ne ? then
+ do:
+ if contentLen gt MAX_DATA_LENGTH then
+ undo, throw new ProtocolException(substitute('Maximum data length was exceeded [&1].', contentLen)).
+ set-size(msgBody) = contentLen.
+ dataIn:readFully(msgBody).
+
+ if dataIn:readByte() ne 0 then
+ undo, throw new ProtocolException(substitute('&1 bytes were read and there was no trailing null byte.', contentLen)).
+ end.
+ /* no content length set, we read till first 'null' */
+ else
+ do:
+ repeat while true:
+ bodyByte = dataIn:readByte().
+ if bodyByte eq 0 then
+ leave.
+
+ if not valid-object(bodyBAOS) then
+ bodyBAOS = new ByteArrayOutputStream().
+
+ contentLen = contentLen + 1.
+ if contentLen gt MAX_DATA_LENGTH then
+ undo, throw new ProtocolException(substitute('Maximum data length was exceeded [&1].', contentLen)).
+
+ bodyBAOS:write(bodyByte).
+
+ end.
+
+ if valid-object(bodyBAOS) then
+ do:
+ bodyBAOS:close().
+ msgBody = bodyBAOS:toByteArray().
+ end.
+ end.
+
+ return new StompFrame(msgCommand, msgHead, msgBody).
+
+ finally:
+ set-size(msgBody) = 0.
+ delete object bodyBAOS no-error.
+ end finally.
+ end method.
+
+ method public void setVersion( input version as integer ):
+ if version ne ? then
+ versionNum = version.
+ end method.
+
+end class.
\ No newline at end of file
Added: net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/provider/stomp/TopicPublisher.cls
===================================================================
--- net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/provider/stomp/TopicPublisher.cls (rev 0)
+++ net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/provider/stomp/TopicPublisher.cls 2011-07-05 09:06:01 UTC (rev 98)
@@ -0,0 +1,62 @@
+/*------------------------------------------------------------------------
+ File : TopicPublisher
+ Purpose :
+ Syntax :
+ Description : A client uses a TopicPublisher object to receive messages
+ that have been delivered to a topic.
+ Author(s) : Marian Edu
+ Created : Fri Nov 05 13:16:13 EET 2010
+ Notes :
+
+ Email : mar...@gm...
+ Website : www.ganimede.ro
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the Lesser GNU 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 program 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
+ Lesser GNU General Public License for more details.
+ You should have received a copy of the Lesser GNU General Public License
+ along with this program. If not, see < http://www.gnu.org/licenses/>.
+ ----------------------------------------------------------------------*/
+
+using javax.jms.Message.
+using javax.jms.Destination.
+using javax.jms.Topic.
+using net.sourceforge.progress.jms.provider.stomp.*.
+
+routine-level on error undo, throw.
+
+class net.sourceforge.progress.jms.provider.stomp.TopicPublisher
+inherits MessageProducer implements javax.jms.TopicPublisher :
+
+
+ constructor public TopicPublisher ( input jmsSession as Session, input topic as Topic ):
+ super (input jmsSession, input cast(topic, 'Destination':u)).
+ end constructor.
+
+ method public javax.jms.Topic getTopic( ):
+ return cast(destination, 'javax.jms.Topic':u).
+ end method.
+
+ method public void publish( input msg as Message ):
+ this-object:send(msg).
+ end method.
+
+ method public void publish (input msg as Message, input deliveryMode as integer, input priority as integer, input timeToLive as int64 ):
+ this-object:send(msg, deliveryMode, priority, timeToLive).
+ end method.
+
+ method public void publish (input topic as javax.jms.Topic, input msg as Message):
+ this-object:publish (topic, msg, deliveryMode, priority, timeToLive).
+ end method.
+
+ method public void publish( input topic as javax.jms.Topic, input msg as javax.jms.Message, input deliveryMode as integer, input priority as integer, input timeToLive as int64 ):
+ if type-of(topic, 'Destination':u) then
+ this-object:send (cast(topic, 'Destination':u), msg, deliveryMode, priority, timeToLive).
+ end method.
+
+end class.
\ No newline at end of file
Added: net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/provider/stomp/TopicSession.cls
===================================================================
--- net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/provider/stomp/TopicSession.cls (rev 0)
+++ net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/provider/stomp/TopicSession.cls 2011-07-05 09:06:01 UTC (rev 98)
@@ -0,0 +1,71 @@
+/*------------------------------------------------------------------------
+ File : TopicSession
+ Purpose :
+ Syntax :
+ Description :
+ Author(s) : Marian Edu
+ Created : Mon Jan 04 21:45:46 EET 2010
+ Notes :
+
+ Email : mar...@gm...
+ Website : www.ganimede.ro
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the Lesser GNU 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 program 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
+ Lesser GNU General Public License for more details.
+ You should have received a copy of the Lesser GNU General Public License
+ along with this program. If not, see < http://www.gnu.org/licenses/>.
+
+ ----------------------------------------------------------------------*/
+using javax.jms.Topic.
+using net.sourceforge.progress.jms.provider.stomp.*.
+
+class net.sourceforge.progress.jms.provider.stomp.TopicSession
+ inherits Session
+ implements javax.jms.TopicSession:
+
+
+ constructor public TopicSession ( input conn as Connection, input isTransacted as logical, input ackMode as integer ):
+ super (input conn, input isTransacted, input ackMode).
+ end constructor.
+
+ method override public javax.jms.TopicSubscriber createDurableSubscriber( input topic as Topic, input name as character ):
+
+ end method.
+
+
+ method override public javax.jms.TopicSubscriber createDurableSubscriber( input topic as Topic, input name as character, input messageSelector as character, input noLocal as logical ):
+
+ end method.
+
+ method public javax.jms.TopicPublisher createPublisher( input topic as Topic ):
+ return new TopicPublisher(this-object, topic).
+ end method.
+
+ method public javax.jms.TopicSubscriber createSubscriber( input topic as Topic ):
+ return new TopicSubscriber(this-object, topic).
+ end method.
+
+ method public javax.jms.TopicSubscriber createSubscriber( input topic as Topic, input messageSelector as character, input noLocal as logical ):
+ return new TopicSubscriber(this-object, topic, messageSelector).
+ end method.
+
+
+
+ method public javax.jms.TemporaryTopic createTemporaryTopic( input topicName as character ):
+
+ undo, throw new Progress.Lang.AppError("METHOD NOT IMPLEMENTED").
+
+ end method.
+
+
+ method override public Topic createTopic( input topicName as character ):
+ return new net.sourceforge.progress.jms.Topic(topicName).
+ end method.
+
+end class.
\ No newline at end of file
Added: net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/provider/stomp/TopicSubscriber.cls
===================================================================
--- net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/provider/stomp/TopicSubscriber.cls (rev 0)
+++ net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/provider/stomp/TopicSubscriber.cls 2011-07-05 09:06:01 UTC (rev 98)
@@ -0,0 +1,61 @@
+/*------------------------------------------------------------------------
+ File : TopicSubscriber
+ Purpose :
+ Syntax :
+ Description : A client uses a TopicSubscriber object to receive messages
+ that have been delivered to a queue.
+
+ Author(s) : Marian Edu
+ Created : Fri Nov 05 16:03:22 EET 2010
+ Notes :
+
+ Email : mar...@gm...
+ Website : www.ganimede.ro
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the Lesser GNU 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 program 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
+ Lesser GNU General Public License for more details.
+ You should have received a copy of the Lesser GNU General Public License
+ along with this program. If not, see < http://www.gnu.org/licenses/>.
+
+ ----------------------------------------------------------------------*/
+using javax.jms.Destination.
+using javax.jms.Topic.
+using net.sourceforge.progress.jms.provider.stomp.*.
+
+routine-level on error undo, throw.
+
+class net.sourceforge.progress.jms.provider.stomp.TopicSubscriber
+ inherits MessageConsumer implements javax.jms.TopicSubscriber :
+
+ define protected variable noLocal as logical no-undo.
+
+ constructor public TopicSubscriber ( jmsSession as Session, destination as Topic, selector as character, noLocal as logical ):
+ super (jmsSession, cast(destination, 'Destination':u), selector).
+ if noLocal ne ? then
+ this-object:noLocal = noLocal.
+ end constructor.
+
+ constructor public TopicSubscriber ( jmsSession as Session, destination as Topic, selector as character ):
+ super (jmsSession, cast(destination, 'Destination':u), selector).
+ end constructor.
+
+ constructor public TopicSubscriber ( input jmsSession as Session, input destination as Topic ):
+ super (jmsSession, cast(destination, 'Destination':u)).
+ end constructor.
+
+
+ method public logical getNoLocal( ):
+ return noLocal.
+ end method.
+
+ method public javax.jms.Topic getTopic( ):
+ return cast(destination, 'javax.jms.Topic':u).
+ end method.
+
+end class.
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <me...@us...> - 2011-07-05 09:04:23
|
Revision: 97
http://progress-jms.svn.sourceforge.net/progress-jms/?rev=97&view=rev
Author: medu
Date: 2011-07-05 09:04:16 +0000 (Tue, 05 Jul 2011)
Log Message:
-----------
added stomp protocol objects
Added Paths:
-----------
net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/provider/stomp/protocol/
net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/provider/stomp/protocol/Commands.cls
net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/provider/stomp/protocol/Headers/
net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/provider/stomp/protocol/Headers/Ack.cls
net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/provider/stomp/protocol/Headers/Connect.cls
net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/provider/stomp/protocol/Headers/Connected.cls
net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/provider/stomp/protocol/Headers/Error.cls
net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/provider/stomp/protocol/Headers/Message.cls
net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/provider/stomp/protocol/Headers/Response.cls
net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/provider/stomp/protocol/Headers/Send.cls
net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/provider/stomp/protocol/Headers/Subscribe.cls
net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/provider/stomp/protocol/Headers/Unsubscribe.cls
net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/provider/stomp/protocol/Headers.cls
net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/provider/stomp/protocol/ProtocolException.cls
net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/provider/stomp/protocol/Responses.cls
net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/provider/stomp/protocol/Stomp.cls
Added: net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/provider/stomp/protocol/Commands.cls
===================================================================
--- net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/provider/stomp/protocol/Commands.cls (rev 0)
+++ net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/provider/stomp/protocol/Commands.cls 2011-07-05 09:04:16 UTC (rev 97)
@@ -0,0 +1,70 @@
+/*------------------------------------------------------------------------
+ File : Commands
+ Purpose :
+ Syntax :
+ Description : Stomp commands.
+ Author(s) : Marian Edu
+ Created : Tue Nov 16 11:36:06 EET 2010
+ Notes :
+
+ Email : mar...@gm...
+ Website : www.ganimede.ro
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the Lesser GNU 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 program 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
+ Lesser GNU General Public License for more details.
+ You should have received a copy of the Lesser GNU General Public License
+ along with this program. If not, see < http://www.gnu.org/licenses/>.
+ ----------------------------------------------------------------------*/
+
+routine-level on error undo, throw.
+
+class net.sourceforge.progress.jms.provider.stomp.protocol.Commands final :
+
+ define public static property CONNECT as character no-undo initial 'CONNECT':u
+ get.
+
+ define public static property SEND as character no-undo initial 'SEND':u
+ get.
+
+ define public static property DISCONNECT as character no-undo initial 'DISCONNECT':u
+ get.
+
+ define public static property SUBSCRIBE as character no-undo initial 'SUBSCRIBE':u
+ get.
+
+ define public static property UNSUBSCRIBE as character no-undo initial 'UNSUBSCRIBE':u
+ get.
+
+ define public static property BEGIN_TRANSACTION as character no-undo initial 'BEGIN':u
+ get.
+
+ define public static property COMMIT_TRANSACTION as character no-undo initial 'COMMIT':u
+ get.
+
+ define public static property ABORT_TRANSACTION as character no-undo initial 'ABORT':u
+ get.
+
+ define public static property BEGIN as character no-undo initial 'BEGIN':u
+ get.
+
+ define public static property COMMIT as character no-undo initial 'COMMIT':u
+ get.
+
+ define public static property ABORT as character no-undo initial 'ABORT':u
+ get.
+
+ define public static property ACK as character no-undo initial 'ACK':u
+ get.
+
+
+ constructor private Commands ( ):
+ end constructor.
+
+
+end class.
\ No newline at end of file
Added: net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/provider/stomp/protocol/Headers/Ack.cls
===================================================================
--- net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/provider/stomp/protocol/Headers/Ack.cls (rev 0)
+++ net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/provider/stomp/protocol/Headers/Ack.cls 2011-07-05 09:04:16 UTC (rev 97)
@@ -0,0 +1,34 @@
+/*------------------------------------------------------------------------
+ File : Headers.Ack
+ Purpose :
+ Syntax :
+ Description : Stomp acknowledge message headers.
+ Author(s) : Marian Edu
+ Created : Tue Nov 16 11:53:52 EET 2010
+ Notes :
+
+ Email : mar...@gm...
+ Website : www.ganimede.ro
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the Lesser GNU 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 program 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
+ Lesser GNU General Public License for more details.
+ You should have received a copy of the Lesser GNU General Public License
+ along with this program. If not, see < http://www.gnu.org/licenses/>.
+ ----------------------------------------------------------------------*/
+
+class net.sourceforge.progress.jms.provider.stomp.protocol.Headers.Ack final :
+
+ define public static property MESSAGE_ID as character no-undo initial 'message-id':u
+ get.
+
+ constructor private Ack ( ):
+ end constructor.
+
+
+end class.
\ No newline at end of file
Added: net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/provider/stomp/protocol/Headers/Connect.cls
===================================================================
--- net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/provider/stomp/protocol/Headers/Connect.cls (rev 0)
+++ net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/provider/stomp/protocol/Headers/Connect.cls 2011-07-05 09:04:16 UTC (rev 97)
@@ -0,0 +1,44 @@
+/*------------------------------------------------------------------------
+ File : Headers.Connect
+ Purpose :
+ Syntax :
+ Description : Stomp connect message headers.
+ Author(s) : Marian Edu
+ Created : Tue Nov 16 11:53:52 EET 2010
+ Notes :
+
+ Email : mar...@gm...
+ Website : www.ganimede.ro
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the Lesser GNU 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 program 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
+ Lesser GNU General Public License for more details.
+ You should have received a copy of the Lesser GNU General Public License
+ along with this program. If not, see < http://www.gnu.org/licenses/>.
+ ----------------------------------------------------------------------*/
+
+class net.sourceforge.progress.jms.provider.stomp.protocol.Headers.Connect final :
+
+ define public static property LOGIN as character no-undo initial 'login':u
+ get.
+
+ define public static property PASSCODE as character no-undo initial 'passcode':u
+ get.
+
+ define public static property CLIENT_ID as character no-undo initial 'client-id':u
+ get.
+
+ define public static property REQUEST_ID as character no-undo initial 'request-id':u
+ get.
+
+
+ constructor private Connect ( ):
+ end constructor.
+
+
+end class.
\ No newline at end of file
Added: net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/provider/stomp/protocol/Headers/Connected.cls
===================================================================
--- net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/provider/stomp/protocol/Headers/Connected.cls (rev 0)
+++ net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/provider/stomp/protocol/Headers/Connected.cls 2011-07-05 09:04:16 UTC (rev 97)
@@ -0,0 +1,37 @@
+/*------------------------------------------------------------------------
+ File : Headers.Connected
+ Purpose :
+ Syntax :
+ Description : Stomp connected message headers.
+ Author(s) : Marian Edu
+ Created : Tue Nov 16 11:53:52 EET 2010
+ Notes :
+
+ Email : mar...@gm...
+ Website : www.ganimede.ro
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the Lesser GNU 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 program 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
+ Lesser GNU General Public License for more details.
+ You should have received a copy of the Lesser GNU General Public License
+ along with this program. If not, see < http://www.gnu.org/licenses/>.
+ ----------------------------------------------------------------------*/
+
+class net.sourceforge.progress.jms.provider.stomp.protocol.Headers.Connected final :
+
+ define public static property SESSION as character no-undo initial 'session':u
+ get.
+
+ define public static property RESPONSE_ID as character no-undo initial 'response-id':u
+ get.
+
+ constructor private Connected ( ):
+ end constructor.
+
+
+end class.
\ No newline at end of file
Added: net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/provider/stomp/protocol/Headers/Error.cls
===================================================================
--- net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/provider/stomp/protocol/Headers/Error.cls (rev 0)
+++ net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/provider/stomp/protocol/Headers/Error.cls 2011-07-05 09:04:16 UTC (rev 97)
@@ -0,0 +1,34 @@
+/*------------------------------------------------------------------------
+ File : Headers.Error
+ Purpose :
+ Syntax :
+ Description : Stomp error message headers.
+ Author(s) : Marian Edu
+ Created : Tue Nov 16 11:53:52 EET 2010
+ Notes :
+
+ Email : mar...@gm...
+ Website : www.ganimede.ro
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the Lesser GNU 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 program 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
+ Lesser GNU General Public License for more details.
+ You should have received a copy of the Lesser GNU General Public License
+ along with this program. If not, see < http://www.gnu.org/licenses/>.
+ ----------------------------------------------------------------------*/
+
+class net.sourceforge.progress.jms.provider.stomp.protocol.Headers.Error final :
+
+ define public static property MESSAGE as character no-undo initial 'message':u
+ get.
+
+ constructor private Error ( ):
+ end constructor.
+
+
+end class.
\ No newline at end of file
Added: net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/provider/stomp/protocol/Headers/Message.cls
===================================================================
--- net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/provider/stomp/protocol/Headers/Message.cls (rev 0)
+++ net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/provider/stomp/protocol/Headers/Message.cls 2011-07-05 09:04:16 UTC (rev 97)
@@ -0,0 +1,65 @@
+/*------------------------------------------------------------------------
+ File : Headers.Message
+ Purpose :
+ Syntax :
+ Description : Stomp message headers.
+ Author(s) : Marian Edu
+ Created : Tue Nov 16 11:53:52 EET 2010
+ Notes :
+
+ Email : mar...@gm...
+ Website : www.ganimede.ro
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the Lesser GNU 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 program 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
+ Lesser GNU General Public License for more details.
+ You should have received a copy of the Lesser GNU General Public License
+ along with this program. If not, see < http://www.gnu.org/licenses/>.
+ ----------------------------------------------------------------------*/
+
+class net.sourceforge.progress.jms.provider.stomp.protocol.Headers.Message final :
+
+ define public static property MESSAGE_ID as character no-undo initial 'message-id':u
+ get.
+
+ define public static property DESTINATION as character no-undo initial 'destination':u
+ get.
+
+ define public static property CORRELATION_ID as character no-undo initial 'correlation-id':u
+ get.
+
+ define public static property REPLY_TO as character no-undo initial 'reply-to':u
+ get.
+
+ define public static property EXPIRATION_TIME as character no-undo initial 'expires':u
+ get.
+
+ define public static property PRIORITY as character no-undo initial 'priority':u
+ get.
+
+ define public static property TYPE as character no-undo initial 'type':u
+ get.
+
+ define public static property REDELIVERED as character no-undo initial 'redelivered':u
+ get.
+
+ define public static property TIMESTAMP as character no-undo initial 'timestamp':u
+ get.
+
+ define public static property SUBSCRIPTION as character no-undo initial 'subscription':u
+ get.
+
+ define public static property USERID as character no-undo initial 'JMSXUserID':u
+ get.
+
+
+ constructor private Message ( ):
+ end constructor.
+
+
+end class.
\ No newline at end of file
Added: net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/provider/stomp/protocol/Headers/Response.cls
===================================================================
--- net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/provider/stomp/protocol/Headers/Response.cls (rev 0)
+++ net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/provider/stomp/protocol/Headers/Response.cls 2011-07-05 09:04:16 UTC (rev 97)
@@ -0,0 +1,34 @@
+/*------------------------------------------------------------------------
+ File : Headers
+ Purpose :
+ Syntax :
+ Description : Stomp message headers.
+ Author(s) : Marian Edu
+ Created : Tue Nov 16 11:53:52 EET 2010
+ Notes :
+
+ Email : mar...@gm...
+ Website : www.ganimede.ro
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the Lesser GNU 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 program 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
+ Lesser GNU General Public License for more details.
+ You should have received a copy of the Lesser GNU General Public License
+ along with this program. If not, see < http://www.gnu.org/licenses/>.
+ ----------------------------------------------------------------------*/
+
+class net.sourceforge.progress.jms.provider.stomp.protocol.Headers.Response final :
+
+ define public static property RECEIPT_ID as character no-undo initial 'receipt-id':u
+ get.
+
+ constructor private Response ( ):
+ end constructor.
+
+
+end class.
\ No newline at end of file
Added: net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/provider/stomp/protocol/Headers/Send.cls
===================================================================
--- net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/provider/stomp/protocol/Headers/Send.cls (rev 0)
+++ net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/provider/stomp/protocol/Headers/Send.cls 2011-07-05 09:04:16 UTC (rev 97)
@@ -0,0 +1,52 @@
+/*------------------------------------------------------------------------
+ File : Headers.Send
+ Purpose :
+ Syntax :
+ Description : Stomp send message headers.
+ Author(s) : Marian Edu
+ Created : Tue Nov 16 11:53:52 EET 2010
+ Notes :
+
+ Email : mar...@gm...
+ Website : www.ganimede.ro
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the Lesser GNU 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 program 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
+ Lesser GNU General Public License for more details.
+ You should have received a copy of the Lesser GNU General Public License
+ along with this program. If not, see < http://www.gnu.org/licenses/>.
+ ----------------------------------------------------------------------*/
+
+class net.sourceforge.progress.jms.provider.stomp.protocol.Headers.Send final :
+
+ define public static property DESTINATION as character no-undo initial 'destination':u
+ get.
+
+ define public static property CORRELATION_ID as character no-undo initial 'correlation-id':u
+ get.
+
+ define public static property REPLY_TO as character no-undo initial 'reply-to':u
+ get.
+
+ define public static property EXPIRATION_TIME as character no-undo initial 'expires':u
+ get.
+
+ define public static property PRIORITY as character no-undo initial 'priority':u
+ get.
+
+ define public static property TYPE as character no-undo initial 'type':u
+ get.
+
+ define public static property PERSISTENT as character no-undo initial 'persistent':u
+ get.
+
+ constructor private Send ( ):
+ end constructor.
+
+
+end class.
\ No newline at end of file
Added: net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/provider/stomp/protocol/Headers/Subscribe.cls
===================================================================
--- net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/provider/stomp/protocol/Headers/Subscribe.cls (rev 0)
+++ net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/provider/stomp/protocol/Headers/Subscribe.cls 2011-07-05 09:04:16 UTC (rev 97)
@@ -0,0 +1,53 @@
+/*------------------------------------------------------------------------
+ File : Headers.Subscribe
+ Purpose :
+ Syntax :
+ Description : Stomp subscribe message headers.
+ Author(s) : Marian Edu
+ Created : Tue Nov 16 11:53:52 EET 2010
+ Notes :
+
+ Email : mar...@gm...
+ Website : www.ganimede.ro
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the Lesser GNU 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 program 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
+ Lesser GNU General Public License for more details.
+ You should have received a copy of the Lesser GNU General Public License
+ along with this program. If not, see < http://www.gnu.org/licenses/>.
+ ----------------------------------------------------------------------*/
+
+class net.sourceforge.progress.jms.provider.stomp.protocol.Headers.Subscribe final :
+
+ define public static property DESTINATION as character no-undo initial 'destination':u
+ get.
+
+ define public static property ACK_MODE as character no-undo initial 'ack':u
+ get.
+
+ define public static property ID as character no-undo initial 'id':u
+ get.
+
+ define public static property SELECTOR as character no-undo initial 'selector':u
+ get.
+
+ define public static property ACK_AUTO as character no-undo initial 'auto':u
+ get.
+
+ define public static property ACK_CLIENT as character no-undo initial 'client':u
+ get.
+
+ define public static property ACK_INDIVIDUAL as character no-undo initial 'client-individual':u
+ get.
+
+
+ constructor private Subscribe ( ):
+ end constructor.
+
+
+end class.
\ No newline at end of file
Added: net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/provider/stomp/protocol/Headers/Unsubscribe.cls
===================================================================
--- net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/provider/stomp/protocol/Headers/Unsubscribe.cls (rev 0)
+++ net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/provider/stomp/protocol/Headers/Unsubscribe.cls 2011-07-05 09:04:16 UTC (rev 97)
@@ -0,0 +1,37 @@
+/*------------------------------------------------------------------------
+ File : Headers.Unsubscribe
+ Purpose :
+ Syntax :
+ Description : Stomp unsubscribe message headers.
+ Author(s) : Marian Edu
+ Created : Tue Nov 16 11:53:52 EET 2010
+ Notes :
+
+ Email : mar...@gm...
+ Website : www.ganimede.ro
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the Lesser GNU 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 program 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
+ Lesser GNU General Public License for more details.
+ You should have received a copy of the Lesser GNU General Public License
+ along with this program. If not, see < http://www.gnu.org/licenses/>.
+ ----------------------------------------------------------------------*/
+
+class net.sourceforge.progress.jms.provider.stomp.protocol.Headers.Unsubscribe final :
+
+ define public static property DESTINATION as character no-undo initial 'destination':u
+ get.
+
+ define public static property ID as character no-undo initial 'id':u
+ get.
+
+ constructor private Unsubscribe ( ):
+ end constructor.
+
+
+end class.
\ No newline at end of file
Added: net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/provider/stomp/protocol/Headers.cls
===================================================================
--- net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/provider/stomp/protocol/Headers.cls (rev 0)
+++ net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/provider/stomp/protocol/Headers.cls 2011-07-05 09:04:16 UTC (rev 97)
@@ -0,0 +1,49 @@
+/*------------------------------------------------------------------------
+ File : Headers
+ Purpose :
+ Syntax :
+ Description : Stomp message headers.
+ Author(s) : Marian Edu
+ Created : Tue Nov 16 11:53:52 EET 2010
+ Notes :
+
+ Email : mar...@gm...
+ Website : www.ganimede.ro
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the Lesser GNU 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 program 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
+ Lesser GNU General Public License for more details.
+ You should have received a copy of the Lesser GNU General Public License
+ along with this program. If not, see < http://www.gnu.org/licenses/>.
+ ----------------------------------------------------------------------*/
+
+class net.sourceforge.progress.jms.provider.stomp.protocol.Headers final :
+
+ define public static property SEPERATOR as character no-undo initial ':':u
+ get.
+
+ define public static property RECEIPT_REQUESTED as character no-undo initial 'receipt':u
+ get.
+
+ define public static property TRANSACTION as character no-undo initial 'transaction':u
+ get.
+
+ define public static property CONTENT_LENGTH as character no-undo initial 'content-length':u
+ get.
+
+ define public static property TRANSFORMATION as character no-undo initial 'transformation':u
+ get.
+
+ define public static property TRANSFORMATION_ERROR as character no-undo initial 'transformation-error':u
+ get.
+
+ constructor private Headers ( ):
+ end constructor.
+
+
+end class.
\ No newline at end of file
Added: net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/provider/stomp/protocol/ProtocolException.cls
===================================================================
--- net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/provider/stomp/protocol/ProtocolException.cls (rev 0)
+++ net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/provider/stomp/protocol/ProtocolException.cls 2011-07-05 09:04:16 UTC (rev 97)
@@ -0,0 +1,41 @@
+ /*------------------------------------------------------------------------
+ File : ProtocolException
+ Purpose :
+ Syntax :
+ Description : Stomp protocol exception.
+ Author(s) : Marian Edu
+ Created : Tue Nov 16 13:57:53 EET 2010
+ Notes :
+
+ Email : mar...@gm...
+ Website : www.ganimede.ro
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the Lesser GNU 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 program 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
+ Lesser GNU General Public License for more details.
+ You should have received a copy of the Lesser GNU General Public License
+ along with this program. If not, see < http://www.gnu.org/licenses/>.
+
+ ----------------------------------------------------------------------*/
+
+using Progress.Lang.*.
+using net.sourceforge.progress.io.IOException.
+
+
+
+class net.sourceforge.progress.jms.provider.stomp.protocol.ProtocolException inherits IOException :
+
+ constructor public ProtocolException ( input reason as character ):
+ super (input reason).
+ end constructor.
+
+ constructor public ProtocolException ( ):
+ super ().
+ end constructor.
+
+end class.
\ No newline at end of file
Added: net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/provider/stomp/protocol/Responses.cls
===================================================================
--- net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/provider/stomp/protocol/Responses.cls (rev 0)
+++ net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/provider/stomp/protocol/Responses.cls 2011-07-05 09:04:16 UTC (rev 97)
@@ -0,0 +1,43 @@
+/*------------------------------------------------------------------------
+ File : Responses
+ Purpose :
+ Syntax :
+ Description : Stomp responses.
+ Author(s) : Marian Edu
+ Created : Tue Nov 16 11:53:52 EET 2010
+ Notes :
+
+ Email : mar...@gm...
+ Website : www.ganimede.ro
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the Lesser GNU 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 program 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
+ Lesser GNU General Public License for more details.
+ You should have received a copy of the Lesser GNU General Public License
+ along with this program. If not, see < http://www.gnu.org/licenses/>.
+ ----------------------------------------------------------------------*/
+
+class net.sourceforge.progress.jms.provider.stomp.protocol.Responses final :
+
+ define public static property CONNECTED as character no-undo initial 'CONNECTED':u
+ get.
+
+ define public static property ERROR as character no-undo initial 'ERROR':u
+ get.
+
+ define public static property MESSAGE as character no-undo initial 'MESSAGE':u
+ get.
+
+ define public static property RECEIPT as character no-undo initial 'RECEIPT':u
+ get.
+
+ constructor private Responses ( ):
+ end constructor.
+
+
+end class.
\ No newline at end of file
Added: net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/provider/stomp/protocol/Stomp.cls
===================================================================
--- net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/provider/stomp/protocol/Stomp.cls (rev 0)
+++ net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/provider/stomp/protocol/Stomp.cls 2011-07-05 09:04:16 UTC (rev 97)
@@ -0,0 +1,38 @@
+/*------------------------------------------------------------------------
+ File : Stomp
+ Purpose :
+ Syntax :
+ Description : Stomp message delimiters.
+ Author(s) : Marian Edu
+ Created : Tue Nov 16 11:36:06 EET 2010
+ Notes :
+
+ Email : mar...@gm...
+ Website : www.ganimede.ro
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the Lesser GNU 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 program 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
+ Lesser GNU General Public License for more details.
+ You should have received a copy of the Lesser GNU General Public License
+ along with this program. If not, see < http://www.gnu.org/licenses/>.
+ ----------------------------------------------------------------------*/
+
+routine-level on error undo, throw.
+
+class net.sourceforge.progress.jms.provider.stomp.protocol.Stomp final :
+
+ define public static property NULL as integer no-undo initial 0
+ get.
+
+ define public static property NEWLINE as character no-undo initial '~\n':u
+ get.
+
+ constructor private Stomp ( ):
+ end constructor.
+
+end class.
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <me...@us...> - 2011-07-05 09:02:53
|
Revision: 96
http://progress-jms.svn.sourceforge.net/progress-jms/?rev=96&view=rev
Author: medu
Date: 2011-07-05 09:02:46 +0000 (Tue, 05 Jul 2011)
Log Message:
-----------
added missing base jms objects
Added Paths:
-----------
net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/Connection.cls
net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/MessageConsumer.cls
net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/MessageProducer.cls
net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/Queue.cls
net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/TemporaryTopic.cls
net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/Topic.cls
Added: net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/Connection.cls
===================================================================
--- net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/Connection.cls (rev 0)
+++ net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/Connection.cls 2011-07-05 09:02:46 UTC (rev 96)
@@ -0,0 +1,142 @@
+/*------------------------------------------------------------------------
+ File : Connection
+ Purpose :
+ Syntax :
+ Description :
+ Author(s) : Marian Edu
+ Created : Mon Jan 04 20:13:09 EET 2010
+ Notes :
+
+ Email : mar...@gm...
+ Website : www.ganimede.ro
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the Lesser GNU 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 program 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
+ Lesser GNU General Public License for more details.
+ You should have received a copy of the Lesser GNU General Public License
+ along with this program. If not, see < http://www.gnu.org/licenses/>.
+
+ ----------------------------------------------------------------------*/
+
+using javax.jms.*.
+
+class net.sourceforge.progress.jms.Connection
+ implements javax.jms.Connection:
+
+
+ define protected variable exceptionListener as ExceptionListener no-undo.
+ define protected variable metaData as ConnectionMetaData no-undo.
+ define protected variable clientId as character no-undo.
+ define protected variable hadActivity as logical no-undo.
+ define protected variable isActive as logical no-undo.
+
+
+ constructor protected Connection ():
+ end constructor.
+
+ /*------------------------------------------------------------------------------
+ Purpose: Closes the connection.
+ ------------------------------------------------------------------------------*/
+ method public void close():
+ this-object:stop().
+ end method.
+
+ /*------------------------------------------------------------------------------
+ Purpose: Creates a Session object.
+ ------------------------------------------------------------------------------*/
+ method public Session createSession( transacted as logical, acknowledgeMode as integer ):
+ undo, throw new net.sourceforge.progress.jms.JMSException().
+ end method.
+
+ /*------------------------------------------------------------------------------
+ Purpose: Gets the client identifier for this connection.
+ ------------------------------------------------------------------------------*/
+ method public character getClientID():
+ return clientId.
+ end method.
+
+ /*------------------------------------------------------------------------------
+ Purpose: Gets the message consumer's MessageListener.
+ ------------------------------------------------------------------------------*/
+ method public ExceptionListener getExceptionListener():
+ if not valid-object(exceptionListener) then
+ undo, throw new net.sourceforge.progress.jms.JMSException
+ ('Invalid ExceptionListener.').
+ return exceptionListener.
+ end method.
+
+ /*------------------------------------------------------------------------------
+ Purpose: Gets the metadata for this connection.
+ ------------------------------------------------------------------------------*/
+ method public ConnectionMetaData getMetaData():
+ if not valid-object(metaData) then
+ undo, throw new net.sourceforge.progress.jms.JMSException
+ ('Invalid ConnectionMetaData.').
+ return metaData.
+ end method.
+
+ /*------------------------------------------------------------------------------
+ Purpose: Sets the client identifier for this connection.
+ ------------------------------------------------------------------------------*/
+ method public void setClientID(clientID as character):
+ define variable jmsConnection as Progress.Lang.Object no-undo.
+
+ if this-object:clientId eq clientId then
+ return.
+
+ if hadActivity then
+ undo, throw new net.sourceforge.progress.jms.IllegalStateException
+ ('Can not set client identifier after action on connection has taken.').
+ jmsConnection = session:first-object.
+ do while valid-object(jmsConnection):
+ if jmsConnection:GetClass():TypeName eq this-object:GetClass():TypeName and
+ cast(jmsConnection, 'javax.jms.Connection':u):getClientID() eq clientId then
+ undo, throw new net.sourceforge.progress.jms.InvalidClientIDException
+ ('Duplicate client identifier on other provider connection.').
+ jmsConnection = jmsConnection:next-sibling.
+ end.
+ this-object:clientId = clientId.
+ end method.
+
+ /*------------------------------------------------------------------------------
+ Purpose: Gets the message consumer's MessageListener.
+ ------------------------------------------------------------------------------*/
+ method public void setExceptionListener(listener as ExceptionListener):
+ if not valid-object(listener) then
+ return.
+ exceptionListener = listener.
+ end method.
+
+ /*------------------------------------------------------------------------------
+ Purpose: Starts (restarts) a connection's delivery of incoming messages.
+ ------------------------------------------------------------------------------*/
+ method public void start():
+ if isActive then
+ return.
+
+ assign
+ hadActivity = true
+ isActive = true.
+
+ end method.
+
+ /*------------------------------------------------------------------------------
+ Purpose: Temporarily stops a connection's delivery of incoming messages.
+ ------------------------------------------------------------------------------*/
+ method public void stop():
+ isActive = false.
+ end method.
+
+ destructor public Connection ( ):
+ this-object:close().
+
+ if valid-object(metaData) then
+ delete object metaData no-error.
+ end destructor.
+
+end class.
\ No newline at end of file
Added: net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/MessageConsumer.cls
===================================================================
--- net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/MessageConsumer.cls (rev 0)
+++ net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/MessageConsumer.cls 2011-07-05 09:02:46 UTC (rev 96)
@@ -0,0 +1,105 @@
+/*------------------------------------------------------------------------
+ File : MessageConsumer
+ Purpose :
+ Syntax :
+ Description : A client uses a MessageConsumer object to receive
+ messages from a destination. A MessageConsumer object is
+ created by passing a Destination object to a
+ message-consumer creation method supplied by a session.
+
+ Author(s) : Marian Edu
+ Created : Fri Nov 05 14:00:49 EET 2010
+ Notes :
+
+ Email : mar...@gm...
+ Website : www.ganimede.ro
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the Lesser GNU 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 program 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
+ Lesser GNU General Public License for more details.
+ You should have received a copy of the Lesser GNU General Public License
+ along with this program. If not, see < http://www.gnu.org/licenses/>.
+
+ ----------------------------------------------------------------------*/
+
+using javax.jms.Destination.
+using javax.jms.Message.
+using javax.jms.MessageListener.
+using javax.jms.MessageConsumer.
+using net.sourceforge.progress.jms.*.
+
+routine-level on error undo, throw.
+
+class net.sourceforge.progress.jms.MessageConsumer implements MessageConsumer :
+
+ define protected property destination as Destination no-undo
+ get.
+ set.
+
+ define protected property jmsSession as Session no-undo
+ get.
+ set.
+
+ define protected property messageListener as MessageListener no-undo
+ get.
+ set.
+
+ define protected property messageSelector as character no-undo initial ?
+ get.
+ private set.
+
+ define protected property isClosed as logical no-undo
+ get.
+ set.
+
+ constructor protected MessageConsumer ( jmsSession as Session, destination as Destination ):
+ this-object(jmsSession, destination, ?).
+ end constructor.
+
+ constructor protected MessageConsumer ( jmsSession as Session, destination as Destination, selector as character ):
+ assign
+ this-object:jmsSession = jmsSession
+ this-object:destination = destination.
+ if selector ne '':u then
+ messageSelector = selector.
+ end constructor.
+
+
+ method public void close( ):
+ isClosed = true.
+ end method.
+
+ method public MessageListener getMessageListener( ):
+ return messageListener.
+ end method.
+
+ method public character getMessageSelector( ):
+ return messageSelector.
+ end method.
+
+ method public Message receive( ):
+ return receive(0).
+ end method.
+
+ method public Message receive( input timeout as int64 ):
+ undo, throw new Progress.Lang.AppError("METHOD NOT IMPLEMENTED").
+ end method.
+
+ method public Message receiveNoWait( ):
+ undo, throw new Progress.Lang.AppError("METHOD NOT IMPLEMENTED").
+ end method.
+
+ method public void setMessageListener( input listener as MessageListener ):
+ messageListener = listener.
+ end method.
+
+ destructor public MessageConsumer ( ):
+ this-object:close().
+ end destructor.
+
+end class.
\ No newline at end of file
Added: net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/MessageProducer.cls
===================================================================
--- net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/MessageProducer.cls (rev 0)
+++ net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/MessageProducer.cls 2011-07-05 09:02:46 UTC (rev 96)
@@ -0,0 +1,150 @@
+/*------------------------------------------------------------------------
+ File : MessageProducer
+ Purpose :
+ Syntax :
+ Description : A client uses a MessageProducer object to send messages
+ to a destination. A MessageProducer object is created
+ by passing a Destination object to a message-producer
+ creation method supplied by a session.
+ Author(s) : Marian Edu
+ Created : Fri Nov 05 12:13:29 EET 2010
+ Notes :
+
+ Email : mar...@gm...
+ Website : www.ganimede.ro
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the Lesser GNU 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 program 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
+ Lesser GNU General Public License for more details.
+ You should have received a copy of the Lesser GNU General Public License
+ along with this program. If not, see < http://www.gnu.org/licenses/>.
+ ----------------------------------------------------------------------*/
+using javax.jms.Destination.
+using javax.jms.Message.
+using net.sourceforge.progress.jms.*.
+
+routine-level on error undo, throw.
+
+class net.sourceforge.progress.jms.MessageProducer implements javax.jms.MessageProducer :
+
+
+ define protected property destination as Destination no-undo
+ get.
+ set.
+
+ define protected property jmsSession as Session no-undo
+ get.
+ set.
+
+ define protected property deliveryMode as integer no-undo
+ get.
+ set.
+
+ define protected property priority as integer no-undo
+ get.
+ set.
+
+ define protected property timeToLive as int64 no-undo
+ get.
+ set.
+
+ define protected property disableMessageID as logical no-undo
+ get.
+ set.
+
+ define protected property disableMessageTimestamp as logical no-undo
+ get.
+ set.
+
+ define protected property isClosed as logical no-undo
+ get.
+ set.
+
+
+ constructor protected MessageProducer ( jmsSession as Session, destination as Destination ):
+ assign
+ this-object:jmsSession = jmsSession
+ this-object:destination = destination
+ timeToLive = net.sourceforge.progress.jms.Message:DEFAULT_TIME_TO_LIVE
+ priority = net.sourceforge.progress.jms.Message:DEFAULT_PRIORITY
+ deliveryMode = net.sourceforge.progress.jms.Message:DEFAULT_DELIVERY_MODE.
+ end constructor.
+
+ method public void close( ):
+ isClosed = true.
+ end method.
+
+ method public integer getDeliveryMode( ):
+ return deliveryMode.
+ end method.
+
+ method public logical getDisableMessageID( ):
+ return disableMessageID.
+ end method.
+
+ method public logical getDisableMessageTimestamp( ):
+ return disableMessageTimestamp.
+ end method.
+
+ method public integer getPriority( ):
+ return priority.
+ end method.
+
+ method public int64 getTimeToLive( ):
+ return timeToLive.
+ end method.
+
+
+ method public void send( input destination as Destination, input msg as Message ):
+ send(destination, msg, deliveryMode, priority, timeToLive).
+ end method.
+
+
+ method public void send( input destination as Destination, input msg as Message, input deliveryMode as integer, input priority as integer, input timeToLive as int64 ):
+ undo, throw new Progress.Lang.AppError("METHOD NOT IMPLEMENTED").
+ end method.
+
+ method public void send( input msg as Message ):
+ send(destination, msg, deliveryMode, priority, timeToLive).
+ end method.
+
+ method public void send( input msg as Message, input deliveryMode as integer, input priority as integer, input timeToLive as int64 ):
+ send(destination, msg, deliveryMode, priority, timeToLive).
+ end method.
+
+ method public void setDeliveryMode( input deliveryMode as integer ):
+ if deliveryMode ne ? then
+ this-object:deliveryMode = deliveryMode.
+ end method.
+
+
+ method public void setDisableMessageID( input val as logical ):
+ if val ne ? then
+ disableMessageID = val.
+ end method.
+
+ method public void setDisableMessageTimestamp( input val as logical ):
+ if val ne ? then
+ disableMessageTimestamp = val.
+ end method.
+
+ method public void setPriority( input priority as integer ):
+ if priority ne ? then
+ this-object:priority = priority.
+ end method.
+
+ method public void setTimeToLive( input timeToLive as int64 ):
+ if timeToLive ne ? then
+ this-object:timeToLive = timeToLive.
+ end method.
+
+ destructor public MessageProducer ( ):
+ close().
+ end destructor.
+
+end class.
\ No newline at end of file
Added: net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/Queue.cls
===================================================================
--- net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/Queue.cls (rev 0)
+++ net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/Queue.cls 2011-07-05 09:02:46 UTC (rev 96)
@@ -0,0 +1,50 @@
+/*------------------------------------------------------------------------
+ File : Queue
+ Purpose :
+ Syntax :
+ Description : A Queue object encapsulates a provider-specific queue
+ name. It is the way a client specifies the identity of a
+ queue to JMS API methods.
+
+ Author(s) : Marian Edu
+ Created : Sun Oct 03 12:02:18 EEST 2010
+ Notes :
+
+ Email : mar...@gm...
+ Website : www.ganimede.ro
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the Lesser GNU 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 program 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
+ Lesser GNU General Public License for more details.
+ You should have received a copy of the Lesser GNU General Public License
+ along with this program. If not, see < http://www.gnu.org/licenses/>
+
+ ----------------------------------------------------------------------*/
+
+using javax.jms.Destination.
+using javax.jms.Queue.
+
+class net.sourceforge.progress.jms.Queue implements Destination, Queue :
+
+ define protected property queueName as character no-undo
+ get.
+ private set.
+
+ constructor public Queue ( name as character ):
+ queueName = name.
+ end constructor.
+
+ method public character getQueueName( ):
+ return queueName.
+ end method.
+
+ method override public character toString( ):
+ return queueName.
+ end method.
+
+end class.
\ No newline at end of file
Added: net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/TemporaryTopic.cls
===================================================================
--- net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/TemporaryTopic.cls (rev 0)
+++ net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/TemporaryTopic.cls 2011-07-05 09:02:46 UTC (rev 96)
@@ -0,0 +1,46 @@
+/*------------------------------------------------------------------------
+ File : TemporaryTopic
+ Purpose :
+ Syntax :
+ Description : A TemporaryTopic object is a unique Topic object created
+ for the duration of a TopicConnection. It is a
+ system-defined Topic that can be consumed only by the
+ TopicConnection that created it.
+ Author(s) : Marian Edu
+ Created : Tue Nov 16 19:58:52 EET 2010
+ Notes :
+
+ Email : mar...@gm...
+ Website : www.ganimede.ro
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the Lesser GNU 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 program 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
+ Lesser GNU General Public License for more details.
+ You should have received a copy of the Lesser GNU General Public License
+ along with this program. If not, see < http://www.gnu.org/licenses/>.
+
+ ----------------------------------------------------------------------*/
+using javax.jms.TopicSession.
+using javax.jms.TemporaryTopic.
+using net.sourceforge.progress.jms.Topic.
+
+routine-level on error undo, throw.
+
+class net.sourceforge.progress.jms.TemporaryTopic inherits Topic implements TemporaryTopic :
+
+ constructor public TemporaryTopic ( input topicSession as TopicSession, input name as character ):
+ super (input name).
+ end constructor.
+
+ method public void delete( ):
+
+ undo, throw new Progress.Lang.AppError("METHOD NOT IMPLEMENTED").
+
+ end method.
+
+end class.
\ No newline at end of file
Added: net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/Topic.cls
===================================================================
--- net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/Topic.cls (rev 0)
+++ net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/Topic.cls 2011-07-05 09:02:46 UTC (rev 96)
@@ -0,0 +1,48 @@
+/*------------------------------------------------------------------------
+ File : Topic
+ Purpose :
+ Syntax :
+ Description : A Topic object encapsulates a provider-specific topic
+ name. It is the way a client specifies the identity of a
+ topic to JMS API methods.
+
+ Author(s) : Marian Edu
+ Created : Sun Oct 03 12:02:18 EEST 2010
+ Notes :
+
+ Email : mar...@gm...
+ Website : www.ganimede.ro
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the Lesser GNU 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 program 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
+ Lesser GNU General Public License for more details.
+ You should have received a copy of the Lesser GNU General Public License
+ along with this program. If not, see < http://www.gnu.org/licenses/>
+
+ ----------------------------------------------------------------------*/
+
+using javax.jms.Destination.
+using javax.jms.Topic.
+
+class net.sourceforge.progress.jms.Topic implements Destination, Topic :
+
+ define protected variable topicName as character no-undo.
+
+ constructor public Topic ( name as character ):
+ topicName = name.
+ end constructor.
+
+ method public character getTopicName( ):
+ return topicName.
+ end method.
+
+ method override public character toString( ):
+ return topicName.
+ end method.
+
+end class.
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <me...@us...> - 2011-07-05 09:01:54
|
Revision: 95
http://progress-jms.svn.sourceforge.net/progress-jms/?rev=95&view=rev
Author: medu
Date: 2011-07-05 09:01:47 +0000 (Tue, 05 Jul 2011)
Log Message:
-----------
exception chain
Modified Paths:
--------------
net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/BytesMessage.cls
net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/ExceptionListener.cls
net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/Message.cls
net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/Session.cls
Modified: net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/BytesMessage.cls
===================================================================
--- net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/BytesMessage.cls 2011-07-05 08:50:54 UTC (rev 94)
+++ net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/BytesMessage.cls 2011-07-05 09:01:47 UTC (rev 95)
@@ -72,8 +72,7 @@
do on error undo, leave:
return dataIn:readBoolean().
catch e as Progress.Lang.Error :
- delete object e.
- undo, throw new MessageEOFException().
+ undo, throw new MessageEOFException(e).
end catch.
end.
end method.
@@ -83,8 +82,7 @@
do on error undo, leave:
return dataIn:readByte().
catch e as Progress.Lang.Error :
- delete object e.
- undo, throw new MessageEOFException().
+ undo, throw new MessageEOFException(e).
end catch.
end.
end method.
@@ -94,8 +92,7 @@
do on error undo, leave:
return dataIn:read(val).
catch e as Progress.Lang.Error :
- delete object e.
- undo, throw new MessageEOFException().
+ undo, throw new MessageEOFException(e).
end catch.
end.
end method.
@@ -105,8 +102,7 @@
do on error undo, leave:
return dataIn:read(val, 0, len).
catch e as Progress.Lang.Error :
- delete object e.
- undo, throw new MessageEOFException().
+ undo, throw new MessageEOFException(e).
end catch.
end.
end method.
@@ -116,8 +112,7 @@
do on error undo, leave:
return dataIn:readChar().
catch e as Progress.Lang.Error :
- delete object e.
- undo, throw new MessageEOFException().
+ undo, throw new MessageEOFException(e).
end catch.
end.
end method.
@@ -127,8 +122,7 @@
do on error undo, leave:
return dataIn:readDouble().
catch e as Progress.Lang.Error :
- delete object e.
- undo, throw new MessageEOFException().
+ undo, throw new MessageEOFException(e).
end catch.
end.
end method.
@@ -138,8 +132,7 @@
do on error undo, leave:
return dataIn:readFloat().
catch e as Progress.Lang.Error :
- delete object e.
- undo, throw new MessageEOFException().
+ undo, throw new MessageEOFException(e).
end catch.
end.
end method.
@@ -149,8 +142,7 @@
do on error undo, leave:
return dataIn:readInt().
catch e as Progress.Lang.Error :
- delete object e.
- undo, throw new MessageEOFException().
+ undo, throw new MessageEOFException(e).
end catch.
end.
end method.
@@ -160,8 +152,7 @@
do on error undo, leave:
return dataIn:readLong().
catch e as Progress.Lang.Error :
- delete object e.
- undo, throw new MessageEOFException().
+ undo, throw new MessageEOFException(e).
end catch.
end.
end method.
@@ -171,8 +162,7 @@
do on error undo, leave:
return dataIn:readShort().
catch e as Progress.Lang.Error :
- delete object e.
- undo, throw new MessageEOFException().
+ undo, throw new MessageEOFException(e).
end catch.
end.
end method.
@@ -182,8 +172,7 @@
do on error undo, leave:
return dataIn:readUnsignedByte().
catch e as Progress.Lang.Error :
- delete object e.
- undo, throw new MessageEOFException().
+ undo, throw new MessageEOFException(e).
end catch.
end.
end method.
@@ -193,8 +182,7 @@
do on error undo, leave:
return dataIn:readUnsignedShort().
catch e as Progress.Lang.Error :
- delete object e.
- undo, throw new MessageEOFException().
+ undo, throw new MessageEOFException(e).
end catch.
end.
end method.
@@ -204,8 +192,7 @@
do on error undo, leave:
return dataIn:readUTFCharacter().
catch e as Progress.Lang.Error :
- delete object e.
- undo, throw new MessageEOFException().
+ undo, throw new MessageEOFException(e).
end catch.
end.
end method.
Modified: net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/ExceptionListener.cls
===================================================================
--- net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/ExceptionListener.cls 2011-07-05 08:50:54 UTC (rev 94)
+++ net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/ExceptionListener.cls 2011-07-05 09:01:47 UTC (rev 95)
@@ -2,7 +2,12 @@
File : ExceptionListener
Purpose :
Syntax :
- Description :
+ Description : If a JMS provider detects a serious problem with a
+ Connection object, it informs the Connection object's
+ ExceptionListener, if one has been registered. It does
+ this by calling the listener's onException method, passing
+ it a JMSException argument describing the problem.
+
Author(s) : Marian Edu
Created : Mon Jan 04 20:19:33 EET 2010
Notes :
Modified: net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/Message.cls
===================================================================
--- net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/Message.cls 2011-07-05 08:50:54 UTC (rev 94)
+++ net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/Message.cls 2011-07-05 09:01:47 UTC (rev 95)
@@ -173,8 +173,7 @@
undo, throw new MessageFormatException().
catch e as Progress.Lang.Error :
- delete object e.
- undo, throw new JMSException().
+ undo, throw new JMSException(e).
end catch.
end method.
@@ -188,8 +187,7 @@
undo, throw new MessageFormatException().
catch e as Progress.Lang.Error :
- delete object e.
- undo, throw new JMSException().
+ undo, throw new JMSException(e).
end catch.
end method.
@@ -204,8 +202,7 @@
undo, throw new MessageFormatException().
catch e as Progress.Lang.Error :
- delete object e.
- undo, throw new JMSException().
+ undo, throw new JMSException(e).
end catch.
end method.
@@ -223,8 +220,7 @@
undo, throw new MessageFormatException().
catch e as Progress.Lang.Error :
- delete object e.
- undo, throw new JMSException().
+ undo, throw new JMSException(e).
end catch.
end method.
@@ -288,8 +284,7 @@
undo, throw new MessageFormatException().
catch e as Progress.Lang.Error :
- delete object e.
- undo, throw new JMSException().
+ undo, throw new JMSException(e).
end catch.
end method.
@@ -298,8 +293,7 @@
return propertyMap_:get(name).
catch e as Progress.Lang.Error :
- delete object e.
- undo, throw new JMSException().
+ undo, throw new JMSException(e).
end catch.
end method.
@@ -307,8 +301,7 @@
return propertyMap_:keySet():iterator().
catch e as Progress.Lang.Error :
- delete object e.
- undo, throw new JMSException().
+ undo, throw new JMSException(e).
end catch.
end method.
@@ -326,8 +319,7 @@
undo, throw new MessageFormatException().
catch e as Progress.Lang.Error :
- delete object e.
- undo, throw new JMSException().
+ undo, throw new JMSException(e).
end catch.
end method.
@@ -349,8 +341,7 @@
delete object o.
catch e as Progress.Lang.Error :
- delete object e.
- undo, throw new JMSException().
+ undo, throw new JMSException(e).
end catch.
end method.
@@ -364,8 +355,7 @@
delete object o.
catch e as Progress.Lang.Error :
- delete object e.
- undo, throw new JMSException().
+ undo, throw new JMSException(e).
end catch.
end method.
@@ -379,8 +369,7 @@
delete object o.
catch e as Progress.Lang.Error :
- delete object e.
- undo, throw new JMSException().
+ undo, throw new JMSException(e).
end catch.
end method.
@@ -398,8 +387,7 @@
delete object o.
catch e as Progress.Lang.Error :
- delete object e.
- undo, throw new JMSException().
+ undo, throw new JMSException(e).
end catch.
end method.
@@ -464,8 +452,7 @@
delete object o.
catch e as Progress.Lang.Error :
- delete object e.
- undo, throw new JMSException().
+ undo, throw new JMSException(e).
end catch.
end method.
@@ -484,8 +471,7 @@
objectArr:add(val).
catch e as Progress.Lang.Error :
- delete object e.
- undo, throw new JMSException().
+ undo, throw new JMSException(e).
end catch.
end method.
@@ -503,8 +489,7 @@
delete object o.
catch e as Progress.Lang.Error :
- delete object e.
- undo, throw new JMSException().
+ undo, throw new JMSException(e).
end catch.
end method.
Modified: net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/Session.cls
===================================================================
--- net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/Session.cls 2011-07-05 08:50:54 UTC (rev 94)
+++ net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/Session.cls 2011-07-05 09:01:47 UTC (rev 95)
@@ -1,175 +1,192 @@
- /*------------------------------------------------------------------------
- File : Session
- Purpose :
- Syntax :
- Description :
- Author(s) : Marian Edu
- Created : Mon Jan 04 21:42:20 EET 2010
- Notes :
+/*------------------------------------------------------------------------
+ File : Session
+ Purpose :
+ Syntax :
+ Description :
+ Author(s) : Marian Edu
+ Created : Sun Oct 03 18:12:30 EEST 2010
+ Notes :
+
+ Email : mar...@gm...
+ Website : www.ganimede.ro
- Email : mar...@gm...
- Website : www.ganimede.ro
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the Lesser GNU 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 program 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
+ Lesser GNU General Public License for more details.
+ You should have received a copy of the Lesser GNU General Public License
+ along with this program. If not, see < http://www.gnu.org/licenses/>.
- This program is free software: you can redistribute it and/or modify
- it under the terms of the Lesser GNU 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 program 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
- Lesser GNU General Public License for more details.
- You should have received a copy of the Lesser GNU General Public License
- along with this program. If not, see < http://www.gnu.org/licenses/>.
-
- ----------------------------------------------------------------------*/
+ ----------------------------------------------------------------------*/
using javax.jms.*.
+using Progress.Lang.Object.
-class net.sourceforge.progress.jms.Session implements Session :
-
- define public property CLIENT_ACKNOWLEDGE as integer no-undo initial 0
- get.
-
- define public property DUPS_OK_ACKNOWLEDGE as integer no-undo initial 1
- get.
-
- define public property AUTO_ACKNOWLEDGE as integer no-undo initial 2
- get.
-
+routine-level on error undo, throw.
- method public void close( ):
-
- undo, throw new Progress.Lang.AppError("METHOD NOT IMPLEMENTED").
-
- end method.
-
-
-
+class net.sourceforge.progress.jms.Session
+ implements Session, java.lang.Runnable :
- method public void commit( ):
-
- undo, throw new Progress.Lang.AppError("METHOD NOT IMPLEMENTED").
-
- end method.
-
-
-
+ define public property CLIENT_ACKNOWLEDGE as integer no-undo initial 0
+ get.
- method public BytesMessage createBytesMessage( ):
-
- undo, throw new Progress.Lang.AppError("METHOD NOT IMPLEMENTED").
-
- end method.
-
-
-
+ define public property DUPS_OK_ACKNOWLEDGE as integer no-undo initial 1
+ get.
- method public MapMessage createMapMessage( ):
-
- undo, throw new Progress.Lang.AppError("METHOD NOT IMPLEMENTED").
+ define public property AUTO_ACKNOWLEDGE as integer no-undo initial 2
+ get.
+
+ define public property SESSION_TRANSACTED as integer no-undo initial 3
+ get.
+
+ define protected property connection as Connection no-undo
+ get.
+ private set.
+
+ define protected property msgListener as MessageListener no-undo
+ get.
+ private set.
+
+ define protected property transacted as logical no-undo
+ get.
+ private set.
+
+ define protected property acknowledgeMode as integer no-undo
+ get.
+ private set.
- end method.
-
-
-
+ constructor protected Session
+ (conn as Connection, isTransacted as logical, ackMode as integer ):
+ assign
+ connection = conn
+ transacted = if isTransacted eq ?
+ then false
+ else isTransacted
+ acknowledgeMode = if transacted
+ then SESSION_TRANSACTED
+ else if ackMode eq ?
+ then CLIENT_ACKNOWLEDGE
+ else ackMode.
+ end constructor.
+
- method public Message createMessage( ):
-
- undo, throw new Progress.Lang.AppError("METHOD NOT IMPLEMENTED").
+ method public void close( ):
+ undo, throw new Progress.Lang.AppError("METHOD NOT IMPLEMENTED").
+ end method.
- end method.
+ method public void commit( ):
+ undo, throw new Progress.Lang.AppError("METHOD NOT IMPLEMENTED").
+ end method.
+ method public QueueBrowser createBrowser( input queue as Queue ):
+ return createBrowser (queue, '':u).
+ end method.
-
-
- method public ObjectMessage createObjectMessage( ):
-
- undo, throw new Progress.Lang.AppError("METHOD NOT IMPLEMENTED").
+ method public QueueBrowser createBrowser( input queue as Queue, input messageSelector as character ):
+ undo, throw new Progress.Lang.AppError("METHOD NOT IMPLEMENTED").
+ end method.
- end method.
+ method public javax.jms.BytesMessage createBytesMessage( ):
+ return new net.sourceforge.progress.jms.BytesMessage (this-object).
+ end method.
-
-
- method public ObjectMessage createObjectMessage( input object as java.io.Serializable ):
-
- undo, throw new Progress.Lang.AppError("METHOD NOT IMPLEMENTED").
+ method public MessageConsumer createConsumer( input dest as Destination ):
+ return createConsumer (dest, '':u).
+ end method.
- end method.
+ method public MessageConsumer createConsumer( input dest as Destination, input messageSelector as character ):
+ end method.
+ method public TopicSubscriber createDurableSubscriber( input topic as Topic, input name as character ):
+ return createDurableSubscriber(topic, name, '':u, false).
+ end method.
-
-
- method public TextMessage createTextMessage( ):
-
- undo, throw new Progress.Lang.AppError("METHOD NOT IMPLEMENTED").
+ method public TopicSubscriber createDurableSubscriber( input topic as Topic, input name as character,
+ input messageSelector as character, input noLocal as logical ):
+ end method.
- end method.
-
-
-
+ method public javax.jms.MapMessage createMapMessage( ):
+ return new net.sourceforge.progress.jms.MapMessage (this-object).
+ end method.
- method public TextMessage createTextMessage( input string as character ):
-
- undo, throw new Progress.Lang.AppError("METHOD NOT IMPLEMENTED").
-
- end method.
-
-
-
+ method public javax.jms.Message createMessage( ):
+ return cast(createTextMessage(), 'javax.jms.Message':u).
+ end method.
- method public MessageListener getMessageListener( ):
-
- undo, throw new Progress.Lang.AppError("METHOD NOT IMPLEMENTED").
+ method public javax.jms.ObjectMessage createObjectMessage( ):
+ return new net.sourceforge.progress.jms.ObjectMessage (this-object).
+ end method.
- end method.
+ method public javax.jms.ObjectMessage createObjectMessage ( input obj as java.io.Serializable ):
+ return new net.sourceforge.progress.jms.ObjectMessage (this-object, obj).
+ end method.
+ method public javax.jms.MessageProducer createProducer( input dest as javax.jms.Destination ):
+ undo, throw new Progress.Lang.AppError("METHOD NOT IMPLEMENTED").
+ end method.
-
-
- method public logical getTransacted( ):
-
- undo, throw new Progress.Lang.AppError("METHOD NOT IMPLEMENTED").
+ method public javax.jms.Queue createQueue( input queueName as character ):
+ undo, throw new Progress.Lang.AppError("METHOD NOT IMPLEMENTED").
+ end method.
- end method.
+ method public javax.jms.StreamMessage createStreamMessage( ):
+ undo, throw new Progress.Lang.AppError("METHOD NOT IMPLEMENTED").
+ end method.
+ method public javax.jms.TemporaryQueue createTemporaryQueue( ):
+ undo, throw new Progress.Lang.AppError("METHOD NOT IMPLEMENTED").
+ end method.
-
-
- method public void recover( ):
-
- undo, throw new Progress.Lang.AppError("METHOD NOT IMPLEMENTED").
+ method public javax.jms.TemporaryTopic createTemporaryTopic( ):
+ undo, throw new Progress.Lang.AppError("METHOD NOT IMPLEMENTED").
+ end method.
- end method.
+ method public TextMessage createTextMessage( ):
+ return createTextMessage('':u).
+ end method.
-
-
+ method public TextMessage createTextMessage( input str as character ):
+ return new net.sourceforge.progress.jms.TextMessage (this-object, str).
+ end method.
- method public void rollback( ):
-
- undo, throw new Progress.Lang.AppError("METHOD NOT IMPLEMENTED").
+ method public javax.jms.Topic createTopic( input topicName as character ):
+ undo, throw new Progress.Lang.AppError("METHOD NOT IMPLEMENTED").
+ end method.
- end method.
+ method public integer getAcknowledgeMode( ):
+ return acknowledgeMode.
+ end method.
+ method public MessageListener getMessageListener( ):
+ return msgListener.
+ end method.
-
+ method public logical getTransacted( ):
+ return transacted.
+ end method.
- method public void run( ):
-
- undo, throw new Progress.Lang.AppError("METHOD NOT IMPLEMENTED").
+ method public void recover( ):
+ undo, throw new Progress.Lang.AppError("METHOD NOT IMPLEMENTED").
+ end method.
- end method.
+ method public void rollback( ):
+ undo, throw new Progress.Lang.AppError("METHOD NOT IMPLEMENTED").
+ end method.
+ method public void run( ):
+ end method.
-
+ method public void setMessageListener( input listener as MessageListener ):
+ msgListener = listener.
+ end method.
- method public void setMessageListener( input listener as MessageListener ):
-
- undo, throw new Progress.Lang.AppError("METHOD NOT IMPLEMENTED").
+ method public void unsubscribe( input name as character ):
+ undo, throw new Progress.Lang.AppError("METHOD NOT IMPLEMENTED").
+ end method.
- end method.
-
-
-
-
end class.
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <me...@us...> - 2011-07-05 08:51:00
|
Revision: 94
http://progress-jms.svn.sourceforge.net/progress-jms/?rev=94&view=rev
Author: medu
Date: 2011-07-05 08:50:54 +0000 (Tue, 05 Jul 2011)
Log Message:
-----------
exception base object
Modified Paths:
--------------
net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/IllegalStateException.cls
net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/InvalidClientIDException.cls
net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/InvalidDestinationException.cls
net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/InvalidSelectorException.cls
net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/JMSException.cls
net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/JMSSecurityException.cls
net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/MessageEOFException.cls
net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/MessageFormatException.cls
net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/MessageNotReadableException.cls
net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/MessageNotWriteableException.cls
net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/ResourceAllocationException.cls
net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/TransactionInProgressException.cls
net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/TransactionRolledBackException.cls
Modified: net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/IllegalStateException.cls
===================================================================
--- net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/IllegalStateException.cls 2011-07-05 08:49:00 UTC (rev 93)
+++ net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/IllegalStateException.cls 2011-07-05 08:50:54 UTC (rev 94)
@@ -29,15 +29,28 @@
inherits net.sourceforge.progress.jms.JMSException
implements javax.jms.JMSException, javax.jms.IllegalStateException final :
- constructor public IllegalStateException ( ):
- super().
- end constructor.
-
- constructor public IllegalStateException ( reason as character):
- super(reason).
- end constructor.
-
- constructor public IllegalStateException ( reason as character, errorCode as character ):
- super(reason, errorCode).
- end constructor.
+ constructor public IllegalStateException ( ):
+ super ().
+ end constructor.
+
+ constructor public IllegalStateException ( input errMsg as character ):
+ super (input errMsg).
+ end constructor.
+
+ constructor public IllegalStateException ( input errMsg as character, input cause as Progress.Lang.Error ):
+ super (input errMsg, input cause).
+ end constructor.
+
+ constructor public IllegalStateException ( input cause as Progress.Lang.Error ):
+ super (input cause).
+ end constructor.
+
+ constructor public IllegalStateException ( input errMsg as character, input errorCode as character ):
+ super (input errMsg, input errorCode).
+ end constructor.
+
+ constructor public IllegalStateException ( input errMsg as character, input errorCode as character, input cause as Progress.Lang.Error ):
+ super (input errMsg, input errorCode, input cause).
+ end constructor.
+
end class.
\ No newline at end of file
Modified: net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/InvalidClientIDException.cls
===================================================================
--- net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/InvalidClientIDException.cls 2011-07-05 08:49:00 UTC (rev 93)
+++ net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/InvalidClientIDException.cls 2011-07-05 08:50:54 UTC (rev 94)
@@ -29,15 +29,28 @@
inherits net.sourceforge.progress.jms.JMSException
implements javax.jms.JMSException, javax.jms.InvalidClientIDException final :
- constructor public InvalidClientIDException ( ):
- super().
- end constructor.
-
- constructor public InvalidClientIDException ( reason as character):
- super(reason).
- end constructor.
-
- constructor public InvalidClientIDException ( reason as character, errorCode as character ):
- super(reason, errorCode).
- end constructor.
+ constructor public InvalidClientIDException ( ):
+ super ().
+ end constructor.
+
+ constructor public InvalidClientIDException ( input errMsg as character ):
+ super (input errMsg).
+ end constructor.
+
+ constructor public InvalidClientIDException ( input errMsg as character, input cause as Progress.Lang.Error ):
+ super (input errMsg, input cause).
+ end constructor.
+
+ constructor public InvalidClientIDException ( input cause as Progress.Lang.Error ):
+ super (input cause).
+ end constructor.
+
+ constructor public InvalidClientIDException ( input errMsg as character, input errorCode as character ):
+ super (input errMsg, input errorCode).
+ end constructor.
+
+ constructor public InvalidClientIDException ( input errMsg as character, input errorCode as character, input cause as Progress.Lang.Error ):
+ super (input errMsg, input errorCode, input cause).
+ end constructor.
+
end class.
\ No newline at end of file
Modified: net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/InvalidDestinationException.cls
===================================================================
--- net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/InvalidDestinationException.cls 2011-07-05 08:49:00 UTC (rev 93)
+++ net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/InvalidDestinationException.cls 2011-07-05 08:50:54 UTC (rev 94)
@@ -28,15 +28,28 @@
inherits net.sourceforge.progress.jms.JMSException
implements javax.jms.JMSException, javax.jms.InvalidDestinationException final :
- constructor public InvalidDestinationException ( ):
- super().
- end constructor.
-
- constructor public InvalidDestinationException ( reason as character):
- super(reason).
- end constructor.
-
- constructor public InvalidDestinationException ( reason as character, errorCode as character ):
- super(reason, errorCode).
- end constructor.
+ constructor public InvalidDestinationException ( ):
+ super ().
+ end constructor.
+
+ constructor public InvalidDestinationException ( input errMsg as character ):
+ super (input errMsg).
+ end constructor.
+
+ constructor public InvalidDestinationException ( input errMsg as character, input cause as Progress.Lang.Error ):
+ super (input errMsg, input cause).
+ end constructor.
+
+ constructor public InvalidDestinationException ( input cause as Progress.Lang.Error ):
+ super (input cause).
+ end constructor.
+
+ constructor public InvalidDestinationException ( input errMsg as character, input errorCode as character ):
+ super (input errMsg, input errorCode).
+ end constructor.
+
+ constructor public InvalidDestinationException ( input errMsg as character, input errorCode as character, input cause as Progress.Lang.Error ):
+ super (input errMsg, input errorCode, input cause).
+ end constructor.
+
end class.
\ No newline at end of file
Modified: net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/InvalidSelectorException.cls
===================================================================
--- net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/InvalidSelectorException.cls 2011-07-05 08:49:00 UTC (rev 93)
+++ net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/InvalidSelectorException.cls 2011-07-05 08:50:54 UTC (rev 94)
@@ -28,15 +28,27 @@
inherits net.sourceforge.progress.jms.JMSException
implements javax.jms.JMSException, javax.jms.InvalidSelectorException final :
- constructor public InvalidSelectorException ( ):
- super().
- end constructor.
-
- constructor public InvalidSelectorException ( reason as character):
- super(reason).
- end constructor.
-
- constructor public InvalidSelectorException ( reason as character, errorCode as character ):
- super(reason, errorCode).
- end constructor.
+ constructor public InvalidSelectorException ( ):
+ super ().
+ end constructor.
+
+ constructor public InvalidSelectorException ( input errMsg as character ):
+ super (input errMsg).
+ end constructor.
+
+ constructor public InvalidSelectorException ( input errMsg as character, input cause as Progress.Lang.Error ):
+ super (input errMsg, input cause).
+ end constructor.
+
+ constructor public InvalidSelectorException ( input cause as Progress.Lang.Error ):
+ super (input cause).
+ end constructor.
+
+ constructor public InvalidSelectorException ( input errMsg as character, input errorCode as character ):
+ super (input errMsg, input errorCode).
+ end constructor.
+
+ constructor public InvalidSelectorException ( input errMsg as character, input errorCode as character, input cause as Progress.Lang.Error ):
+ super (input errMsg, input errorCode, input cause).
+ end constructor.
end class.
\ No newline at end of file
Modified: net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/JMSException.cls
===================================================================
--- net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/JMSException.cls 2011-07-05 08:49:00 UTC (rev 93)
+++ net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/JMSException.cls 2011-07-05 08:50:54 UTC (rev 94)
@@ -22,40 +22,49 @@
along with this program. If not, see < http://www.gnu.org/licenses/>.
----------------------------------------------------------------------*/
+using net.sourceforge.progress.lang.Exception.
+using Progress.Lang.Error.
-class net.sourceforge.progress.jms.JMSException inherits Progress.Lang.AppError
+class net.sourceforge.progress.jms.JMSException inherits Exception
implements javax.jms.JMSException:
define private variable exceptionCode as character no-undo.
- define private variable exceptionError as Progress.Lang.Error no-undo.
- constructor public JMSException ( ):
+ constructor public JMSException ( ):
+ super ().
end constructor.
-
- constructor public JMSException ( reason as character ):
- this-object(reason, ?).
+
+ constructor public JMSException ( input errMsg as character ):
+ super (input errMsg).
end constructor.
- constructor public JMSException ( reason as character, errorCode as character ):
- assign
- ReturnValue = reason
- exceptionCode = errorCode.
+ constructor public JMSException ( input errMsg as character, input cause as Progress.Lang.Error ):
+ super (input errMsg, input cause).
end constructor.
- method public character getMessage ():
- return ReturnValue.
- end method.
+ constructor public JMSException ( input cause as Progress.Lang.Error ):
+ super (input cause).
+ end constructor.
+
+ constructor public JMSException ( errMsg as character, errorCode as character ):
+ this-object(errMsg, errorCode, ?).
+ end constructor.
+
+ constructor public JMSException ( errMsg as character, errorCode as character, cause as Progress.Lang.Error ):
+ super (input errMsg, input cause).
+ exceptionCode = errorCode.
+ end constructor.
method public character getErrorCode ():
return exceptionCode.
end method.
method public void setLinkedException (ex as Progress.Lang.Error):
- exceptionError = ex.
+ cause = ex.
end method.
method public Progress.Lang.Error getLinkedException ():
- return exceptionError.
+ return cause.
end method.
end class.
\ No newline at end of file
Modified: net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/JMSSecurityException.cls
===================================================================
--- net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/JMSSecurityException.cls 2011-07-05 08:49:00 UTC (rev 93)
+++ net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/JMSSecurityException.cls 2011-07-05 08:50:54 UTC (rev 94)
@@ -30,15 +30,28 @@
inherits net.sourceforge.progress.jms.JMSException
implements javax.jms.JMSException, javax.jms.JMSSecurityException final :
- constructor public JMSSecurityException ():
- super().
- end constructor.
-
- constructor public JMSSecurityException ( reason as character):
- super(reason).
- end constructor.
-
- constructor public JMSSecurityException ( reason as character, errorCode as character ):
- super(reason, errorCode).
- end constructor.
+ constructor public JMSSecurityException ( ):
+ super ().
+ end constructor.
+
+ constructor public JMSSecurityException ( input errMsg as character ):
+ super (input errMsg).
+ end constructor.
+
+ constructor public JMSSecurityException ( input errMsg as character, input cause as Progress.Lang.Error ):
+ super (input errMsg, input cause).
+ end constructor.
+
+ constructor public JMSSecurityException ( input cause as Progress.Lang.Error ):
+ super (input cause).
+ end constructor.
+
+ constructor public JMSSecurityException ( input errMsg as character, input errorCode as character ):
+ super (input errMsg, input errorCode).
+ end constructor.
+
+ constructor public JMSSecurityException ( input errMsg as character, input errorCode as character, input cause as Progress.Lang.Error ):
+ super (input errMsg, input errorCode, input cause).
+ end constructor.
+
end class.
\ No newline at end of file
Modified: net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/MessageEOFException.cls
===================================================================
--- net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/MessageEOFException.cls 2011-07-05 08:49:00 UTC (rev 93)
+++ net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/MessageEOFException.cls 2011-07-05 08:50:54 UTC (rev 94)
@@ -29,15 +29,27 @@
inherits net.sourceforge.progress.jms.JMSException
implements javax.jms.JMSException, javax.jms.MessageEOFException final :
- constructor public MessageEOFException ( ):
- super().
- end constructor.
-
- constructor public MessageEOFException ( reason as character):
- super(reason).
- end constructor.
-
- constructor public MessageEOFException ( reason as character, errorCode as character ):
- super(reason, errorCode).
- end constructor.
+ constructor public MessageEOFException ( ):
+ super ().
+ end constructor.
+
+ constructor public MessageEOFException ( input errMsg as character ):
+ super (input errMsg).
+ end constructor.
+
+ constructor public MessageEOFException ( input errMsg as character, input cause as Progress.Lang.Error ):
+ super (input errMsg, input cause).
+ end constructor.
+
+ constructor public MessageEOFException ( input cause as Progress.Lang.Error ):
+ super (input cause).
+ end constructor.
+
+ constructor public MessageEOFException ( input errMsg as character, input errorCode as character ):
+ super (input errMsg, input errorCode).
+ end constructor.
+
+ constructor public MessageEOFException ( input errMsg as character, input errorCode as character, input cause as Progress.Lang.Error ):
+ super (input errMsg, input errorCode, input cause).
+ end constructor.
end class.
\ No newline at end of file
Modified: net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/MessageFormatException.cls
===================================================================
--- net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/MessageFormatException.cls 2011-07-05 08:49:00 UTC (rev 93)
+++ net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/MessageFormatException.cls 2011-07-05 08:50:54 UTC (rev 94)
@@ -29,15 +29,28 @@
inherits net.sourceforge.progress.jms.JMSException
implements javax.jms.JMSException, javax.jms.MessageFormatException final :
- constructor public MessageFormatException ():
- super().
- end constructor.
-
- constructor public MessageFormatException ( reason as character):
- super(reason).
- end constructor.
-
- constructor public MessageFormatException ( reason as character, errorCode as character ):
- super(reason, errorCode).
- end constructor.
+ constructor public MessageFormatException ( ):
+ super ().
+ end constructor.
+
+ constructor public MessageFormatException ( input errMsg as character ):
+ super (input errMsg).
+ end constructor.
+
+ constructor public MessageFormatException ( input errMsg as character, input cause as Progress.Lang.Error ):
+ super (input errMsg, input cause).
+ end constructor.
+
+ constructor public MessageFormatException ( input cause as Progress.Lang.Error ):
+ super (input cause).
+ end constructor.
+
+ constructor public MessageFormatException ( input errMsg as character, input errorCode as character ):
+ super (input errMsg, input errorCode).
+ end constructor.
+
+ constructor public MessageFormatException ( input errMsg as character, input errorCode as character, input cause as Progress.Lang.Error ):
+ super (input errMsg, input errorCode, input cause).
+ end constructor.
+
end class.
\ No newline at end of file
Modified: net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/MessageNotReadableException.cls
===================================================================
--- net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/MessageNotReadableException.cls 2011-07-05 08:49:00 UTC (rev 93)
+++ net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/MessageNotReadableException.cls 2011-07-05 08:50:54 UTC (rev 94)
@@ -27,16 +27,29 @@
class net.sourceforge.progress.jms.MessageNotReadableException
inherits net.sourceforge.progress.jms.JMSException
implements javax.jms.JMSException, javax.jms.MessageNotReadableException final :
+
+ constructor public MessageNotReadableException ( ):
+ super ().
+ end constructor.
- constructor public MessageNotReadableException ( ):
- super().
- end constructor.
-
- constructor public MessageNotReadableException ( reason as character):
- super(reason).
- end constructor.
-
- constructor public MessageNotReadableException ( reason as character, errorCode as character ):
- super(reason, errorCode).
- end constructor.
+ constructor public MessageNotReadableException ( input errMsg as character ):
+ super (input errMsg).
+ end constructor.
+
+ constructor public MessageNotReadableException ( input errMsg as character, input cause as Progress.Lang.Error ):
+ super (input errMsg, input cause).
+ end constructor.
+
+ constructor public MessageNotReadableException ( input cause as Progress.Lang.Error ):
+ super (input cause).
+ end constructor.
+
+ constructor public MessageNotReadableException ( input errMsg as character, input errorCode as character ):
+ super (input errMsg, input errorCode).
+ end constructor.
+
+ constructor public MessageNotReadableException ( input errMsg as character, input errorCode as character, input cause as Progress.Lang.Error ):
+ super (input errMsg, input errorCode, input cause).
+ end constructor.
+
end class.
\ No newline at end of file
Modified: net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/MessageNotWriteableException.cls
===================================================================
--- net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/MessageNotWriteableException.cls 2011-07-05 08:49:00 UTC (rev 93)
+++ net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/MessageNotWriteableException.cls 2011-07-05 08:50:54 UTC (rev 94)
@@ -28,15 +28,28 @@
inherits net.sourceforge.progress.jms.JMSException
implements javax.jms.JMSException, javax.jms.MessageNotWriteableException final :
- constructor public MessageNotWriteableException ( ):
- super().
- end constructor.
-
- constructor public MessageNotWriteableException ( reason as character):
- super(reason).
- end constructor.
-
- constructor public MessageNotWriteableException ( reason as character, errorCode as character ):
- super(reason, errorCode).
- end constructor.
+ constructor public MessageNotWriteableException ( ):
+ super ().
+ end constructor.
+
+ constructor public MessageNotWriteableException ( input errMsg as character ):
+ super (input errMsg).
+ end constructor.
+
+ constructor public MessageNotWriteableException ( input errMsg as character, input cause as Progress.Lang.Error ):
+ super (input errMsg, input cause).
+ end constructor.
+
+ constructor public MessageNotWriteableException ( input cause as Progress.Lang.Error ):
+ super (input cause).
+ end constructor.
+
+ constructor public MessageNotWriteableException ( input errMsg as character, input errorCode as character ):
+ super (input errMsg, input errorCode).
+ end constructor.
+
+ constructor public MessageNotWriteableException ( input errMsg as character, input errorCode as character, input cause as Progress.Lang.Error ):
+ super (input errMsg, input errorCode, input cause).
+ end constructor.
+
end class.
\ No newline at end of file
Modified: net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/ResourceAllocationException.cls
===================================================================
--- net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/ResourceAllocationException.cls 2011-07-05 08:49:00 UTC (rev 93)
+++ net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/ResourceAllocationException.cls 2011-07-05 08:50:54 UTC (rev 94)
@@ -28,15 +28,28 @@
inherits net.sourceforge.progress.jms.JMSException
implements javax.jms.JMSException, javax.jms.ResourceAllocationException final :
- constructor public ResourceAllocationException ( ):
- super().
- end constructor.
-
- constructor public ResourceAllocationException ( reason as character):
- super(reason).
- end constructor.
-
- constructor public ResourceAllocationException ( reason as character, errorCode as character ):
- super(reason, errorCode).
- end constructor.
+ constructor public ResourceAllocationException ( ):
+ super ().
+ end constructor.
+
+ constructor public ResourceAllocationException ( input errMsg as character ):
+ super (input errMsg).
+ end constructor.
+
+ constructor public ResourceAllocationException ( input errMsg as character, input cause as Progress.Lang.Error ):
+ super (input errMsg, input cause).
+ end constructor.
+
+ constructor public ResourceAllocationException ( input cause as Progress.Lang.Error ):
+ super (input cause).
+ end constructor.
+
+ constructor public ResourceAllocationException ( input errMsg as character, input errorCode as character ):
+ super (input errMsg, input errorCode).
+ end constructor.
+
+ constructor public ResourceAllocationException ( input errMsg as character, input errorCode as character, input cause as Progress.Lang.Error ):
+ super (input errMsg, input errorCode, input cause).
+ end constructor.
+
end class.
\ No newline at end of file
Modified: net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/TransactionInProgressException.cls
===================================================================
--- net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/TransactionInProgressException.cls 2011-07-05 08:49:00 UTC (rev 93)
+++ net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/TransactionInProgressException.cls 2011-07-05 08:50:54 UTC (rev 94)
@@ -28,15 +28,28 @@
inherits net.sourceforge.progress.jms.JMSException
implements javax.jms.JMSException, javax.jms.TransactionInProgressException final :
- constructor public TransactionInProgressException ( ):
- super().
- end constructor.
-
- constructor public TransactionInProgressException ( reason as character):
- super(reason).
- end constructor.
-
- constructor public TransactionInProgressException ( reason as character, errorCode as character ):
- super(reason, errorCode).
- end constructor.
+ constructor public TransactionInProgressException ( ):
+ super ().
+ end constructor.
+
+ constructor public TransactionInProgressException ( input errMsg as character ):
+ super (input errMsg).
+ end constructor.
+
+ constructor public TransactionInProgressException ( input errMsg as character, input cause as Progress.Lang.Error ):
+ super (input errMsg, input cause).
+ end constructor.
+
+ constructor public TransactionInProgressException ( input cause as Progress.Lang.Error ):
+ super (input cause).
+ end constructor.
+
+ constructor public TransactionInProgressException ( input errMsg as character, input errorCode as character ):
+ super (input errMsg, input errorCode).
+ end constructor.
+
+ constructor public TransactionInProgressException ( input errMsg as character, input errorCode as character, input cause as Progress.Lang.Error ):
+ super (input errMsg, input errorCode, input cause).
+ end constructor.
+
end class.
\ No newline at end of file
Modified: net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/TransactionRolledBackException.cls
===================================================================
--- net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/TransactionRolledBackException.cls 2011-07-05 08:49:00 UTC (rev 93)
+++ net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/TransactionRolledBackException.cls 2011-07-05 08:50:54 UTC (rev 94)
@@ -28,16 +28,29 @@
class net.sourceforge.progress.jms.TransactionRolledBackException
inherits net.sourceforge.progress.jms.JMSException
implements javax.jms.JMSException, javax.jms.TransactionRolledBackException final :
+
+ constructor public TransactionRolledBackException ( ):
+ super ().
+ end constructor.
- constructor public TransactionRolledBackException ( ):
- super().
- end constructor.
-
- constructor public TransactionRolledBackException ( reason as character):
- super(reason).
- end constructor.
-
- constructor public TransactionRolledBackException ( reason as character, errorCode as character ):
- super(reason, errorCode).
- end constructor.
+ constructor public TransactionRolledBackException ( input errMsg as character ):
+ super (input errMsg).
+ end constructor.
+
+ constructor public TransactionRolledBackException ( input errMsg as character, input cause as Progress.Lang.Error ):
+ super (input errMsg, input cause).
+ end constructor.
+
+ constructor public TransactionRolledBackException ( input cause as Progress.Lang.Error ):
+ super (input cause).
+ end constructor.
+
+ constructor public TransactionRolledBackException ( input errMsg as character, input errorCode as character ):
+ super (input errMsg, input errorCode).
+ end constructor.
+
+ constructor public TransactionRolledBackException ( input errMsg as character, input errorCode as character, input cause as Progress.Lang.Error ):
+ super (input errMsg, input errorCode, input cause).
+ end constructor.
+
end class.
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <me...@us...> - 2011-07-05 08:49:07
|
Revision: 93
http://progress-jms.svn.sourceforge.net/progress-jms/?rev=93&view=rev
Author: medu
Date: 2011-07-05 08:49:00 +0000 (Tue, 05 Jul 2011)
Log Message:
-----------
fixed byte array streams
exception chain
Modified Paths:
--------------
net.sourceforge.progress.jms/src/net/sourceforge/progress/io/ByteArrayInputStream.cls
net.sourceforge.progress.jms/src/net/sourceforge/progress/io/ByteArrayOutputStream.cls
net.sourceforge.progress.jms/src/net/sourceforge/progress/io/DataOutputStream.cls
net.sourceforge.progress.jms/src/net/sourceforge/progress/io/EOFException.cls
net.sourceforge.progress.jms/src/net/sourceforge/progress/io/FilterInputStream.cls
net.sourceforge.progress.jms/src/net/sourceforge/progress/io/FilterOutputStream.cls
net.sourceforge.progress.jms/src/net/sourceforge/progress/io/IOException.cls
net.sourceforge.progress.jms/src/net/sourceforge/progress/io/InputStream.cls
Modified: net.sourceforge.progress.jms/src/net/sourceforge/progress/io/ByteArrayInputStream.cls
===================================================================
--- net.sourceforge.progress.jms/src/net/sourceforge/progress/io/ByteArrayInputStream.cls 2011-07-05 08:31:30 UTC (rev 92)
+++ net.sourceforge.progress.jms/src/net/sourceforge/progress/io/ByteArrayInputStream.cls 2011-07-05 08:49:00 UTC (rev 93)
@@ -108,16 +108,14 @@
end method.
method override public int64 skip (len as int64):
- define variable tmp as integer no-undo.
-
if len eq ? or len le 0 then
return 0.
assign
- tmp = pos
- pos = if count - pos lt len then count else integer(pos + len).
+ len = minimum(len, count - pos)
+ pos = pos + len.
- return pos - tmp.
+ return len.
end method.
end class.
\ No newline at end of file
Modified: net.sourceforge.progress.jms/src/net/sourceforge/progress/io/ByteArrayOutputStream.cls
===================================================================
--- net.sourceforge.progress.jms/src/net/sourceforge/progress/io/ByteArrayOutputStream.cls 2011-07-05 08:31:30 UTC (rev 92)
+++ net.sourceforge.progress.jms/src/net/sourceforge/progress/io/ByteArrayOutputStream.cls 2011-07-05 08:49:00 UTC (rev 93)
@@ -76,7 +76,9 @@
method public memptr toByteArray( ):
define variable result as memptr no-undo.
- result = get-bytes(buf, 1, count).
+ assign
+ set-size(result) = count
+ result = get-bytes(buf, 1, count).
return result.
end method.
@@ -88,8 +90,7 @@
put-byte(buf, count) = bit.
catch e as Progress.Lang.Error:
- delete object e.
- undo, throw new IOException().
+ undo, throw new IOException(e).
end catch.
end method.
@@ -113,8 +114,7 @@
count = count + len.
catch e as Progress.Lang.Error:
- delete object e.
- undo, throw new IOException().
+ undo, throw new IOException(e).
end catch.
end method.
Modified: net.sourceforge.progress.jms/src/net/sourceforge/progress/io/DataOutputStream.cls
===================================================================
--- net.sourceforge.progress.jms/src/net/sourceforge/progress/io/DataOutputStream.cls 2011-07-05 08:31:30 UTC (rev 92)
+++ net.sourceforge.progress.jms/src/net/sourceforge/progress/io/DataOutputStream.cls 2011-07-05 08:49:00 UTC (rev 93)
@@ -51,8 +51,7 @@
outStream:write(if val then 1 else 0).
catch e as Progress.Lang.SysError :
- delete object e.
- undo, throw new IOException().
+ undo, throw new IOException(e).
end catch.
end method.
@@ -62,8 +61,7 @@
outStream:write(val).
catch e as Progress.Lang.SysError :
- delete object e.
- undo, throw new IOException().
+ undo, throw new IOException(e).
end catch.
end method.
Modified: net.sourceforge.progress.jms/src/net/sourceforge/progress/io/EOFException.cls
===================================================================
--- net.sourceforge.progress.jms/src/net/sourceforge/progress/io/EOFException.cls 2011-07-05 08:31:30 UTC (rev 92)
+++ net.sourceforge.progress.jms/src/net/sourceforge/progress/io/EOFException.cls 2011-07-05 08:49:00 UTC (rev 93)
@@ -1,36 +1,45 @@
- /*------------------------------------------------------------------------
- File : EOFException
- Purpose :
- Syntax :
- Description :
- Author(s) : Marian Edu
- Created : Wed Sep 22 19:56:09 EEST 2010
- Notes :
+/*------------------------------------------------------------------------
+ File : EOFException
+ Purpose :
+ Syntax :
+ Description :
+ Author(s) : Marian Edu
+ Created : Wed Sep 22 19:56:09 EEST 2010
+ Notes :
- Email : mar...@gm...
- Website : www.ganimede.ro
+ Email : mar...@gm...
+ Website : www.ganimede.ro
- This program is free software: you can redistribute it and/or modify
- it under the terms of the Lesser GNU 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 program 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
- Lesser GNU General Public License for more details.
- You should have received a copy of the Lesser GNU General Public License
- along with this program. If not, see < http://www.gnu.org/licenses/>.
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the Lesser GNU 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 program 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
+ Lesser GNU General Public License for more details.
+ You should have received a copy of the Lesser GNU General Public License
+ along with this program. If not, see < http://www.gnu.org/licenses/>.
- ----------------------------------------------------------------------*/
+ ----------------------------------------------------------------------*/
-using Progress.Lang.AppError.
-
class net.sourceforge.progress.io.EOFException
inherits net.sourceforge.progress.io.IOException:
- constructor public EOFException():
+ constructor public EOFException ( ):
+ super ().
end constructor.
-
- constructor public EOFException ( reason as character ):
+
+ constructor public EOFException ( input errMsg as character ):
+ super (input errMsg).
end constructor.
+
+ constructor public EOFException ( input errMsg as character, input cause as Progress.Lang.Error ):
+ super (input errMsg, input cause).
+ end constructor.
+
+ constructor public EOFException ( input cause as Progress.Lang.Error ):
+ super (input cause).
+ end constructor.
+
end class.
\ No newline at end of file
Modified: net.sourceforge.progress.jms/src/net/sourceforge/progress/io/FilterInputStream.cls
===================================================================
--- net.sourceforge.progress.jms/src/net/sourceforge/progress/io/FilterInputStream.cls 2011-07-05 08:31:30 UTC (rev 92)
+++ net.sourceforge.progress.jms/src/net/sourceforge/progress/io/FilterInputStream.cls 2011-07-05 08:49:00 UTC (rev 93)
@@ -52,8 +52,7 @@
return inStream:available().
catch e as Progress.Lang.Error :
- delete object e.
- undo, throw new IOException().
+ undo, throw new IOException(e).
end catch.
end method.
@@ -61,8 +60,7 @@
inStream:close().
catch e as Progress.Lang.SysError :
- delete object e.
- undo, throw new IOException().
+ undo, throw new IOException(e).
end catch.
end method.
@@ -70,8 +68,7 @@
inStream:mark(limit).
catch e as Progress.Lang.SysError :
- delete object e.
- undo, throw new IOException().
+ undo, throw new IOException(e).
end catch.
end method.
@@ -88,8 +85,7 @@
return inStream:read().
catch e as Progress.Lang.SysError :
- delete object e.
- undo, throw new IOException().
+ undo, throw new IOException(e).
end catch.
end method.
@@ -97,8 +93,7 @@
return inStream:read(bytes, offset, len).
catch e as Progress.Lang.SysError :
- delete object e.
- undo, throw new IOException().
+ undo, throw new IOException(e).
end catch.
end method.
@@ -106,8 +101,7 @@
inStream:reset().
catch e as Progress.Lang.SysError :
- delete object e.
- undo, throw new IOException().
+ undo, throw new IOException(e).
end catch.
end method.
@@ -115,8 +109,7 @@
return inStream:skip(len).
catch e as Progress.Lang.SysError :
- delete object e.
- undo, throw new IOException().
+ undo, throw new IOException(e).
end catch.
end method.
Modified: net.sourceforge.progress.jms/src/net/sourceforge/progress/io/FilterOutputStream.cls
===================================================================
--- net.sourceforge.progress.jms/src/net/sourceforge/progress/io/FilterOutputStream.cls 2011-07-05 08:31:30 UTC (rev 92)
+++ net.sourceforge.progress.jms/src/net/sourceforge/progress/io/FilterOutputStream.cls 2011-07-05 08:49:00 UTC (rev 93)
@@ -46,8 +46,7 @@
flush().
outStream:close().
catch e as Progress.Lang.SysError:
- delete object e.
- undo, throw new IOException().
+ undo, throw new IOException(e).
end catch.
end method.
@@ -55,8 +54,7 @@
outStream:flush().
catch e as Progress.Lang.SysError :
- delete object e.
- undo, throw new IOException().
+ undo, throw new IOException(e).
end catch.
end method.
@@ -64,8 +62,7 @@
outStream:write(bit).
catch e as Progress.Lang.SysError :
- delete object e.
- undo, throw new IOException().
+ undo, throw new IOException(e).
end catch.
end method.
@@ -73,8 +70,7 @@
outStream:write(bytes, offset, len).
catch e as Progress.Lang.SysError :
- delete object e.
- undo, throw new IOException().
+ undo, throw new IOException(e).
end catch.
end method.
Modified: net.sourceforge.progress.jms/src/net/sourceforge/progress/io/IOException.cls
===================================================================
--- net.sourceforge.progress.jms/src/net/sourceforge/progress/io/IOException.cls 2011-07-05 08:31:30 UTC (rev 92)
+++ net.sourceforge.progress.jms/src/net/sourceforge/progress/io/IOException.cls 2011-07-05 08:49:00 UTC (rev 93)
@@ -1,37 +1,48 @@
- /*------------------------------------------------------------------------
- File : IOException
- Purpose :
- Syntax :
- Description :
- Author(s) : Marian Edu
- Created : Wed Sep 22 19:56:09 EEST 2010
- Notes :
+/*------------------------------------------------------------------------
+ File : IOException
+ Purpose :
+ Syntax :
+ Description :
+ Author(s) : Marian Edu
+ Created : Wed Sep 22 19:56:09 EEST 2010
+ Notes :
- Email : mar...@gm...
- Website : www.ganimede.ro
+ Email : mar...@gm...
+ Website : www.ganimede.ro
- This program is free software: you can redistribute it and/or modify
- it under the terms of the Lesser GNU 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 program 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
- Lesser GNU General Public License for more details.
- You should have received a copy of the Lesser GNU General Public License
- along with this program. If not, see < http://www.gnu.org/licenses/>.
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the Lesser GNU 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 program 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
+ Lesser GNU General Public License for more details.
+ You should have received a copy of the Lesser GNU General Public License
+ along with this program. If not, see < http://www.gnu.org/licenses/>.
- ----------------------------------------------------------------------*/
+ ----------------------------------------------------------------------*/
-using Progress.Lang.AppError.
+using net.sourceforge.progress.lang.Exception.
class net.sourceforge.progress.io.IOException
- inherits AppError:
+ inherits Exception:
- constructor public IOException():
+
+ constructor public IOException ( ):
+ SUPER ().
end constructor.
-
- constructor public IOException ( reason as character ):
- ReturnValue = reason.
+
+ constructor public IOException ( input errMsg as character ):
+ SUPER (input errMsg).
end constructor.
+
+ constructor public IOException ( input errMsg as character, input cause as Progress.Lang.Error ):
+ SUPER (input errMsg, input cause).
+ end constructor.
+
+ constructor public IOException ( input cause as Progress.Lang.Error ):
+ SUPER (input cause).
+ end constructor.
+
end class.
\ No newline at end of file
Modified: net.sourceforge.progress.jms/src/net/sourceforge/progress/io/InputStream.cls
===================================================================
--- net.sourceforge.progress.jms/src/net/sourceforge/progress/io/InputStream.cls 2011-07-05 08:31:30 UTC (rev 92)
+++ net.sourceforge.progress.jms/src/net/sourceforge/progress/io/InputStream.cls 2011-07-05 08:49:00 UTC (rev 93)
@@ -93,7 +93,7 @@
delete object e.
return bits.
end.
- undo, throw e.
+ undo, throw new IOException(e).
end catch.
end.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <me...@us...> - 2011-07-05 08:31:40
|
Revision: 92
http://progress-jms.svn.sourceforge.net/progress-jms/?rev=92&view=rev
Author: medu
Date: 2011-07-05 08:31:30 +0000 (Tue, 05 Jul 2011)
Log Message:
-----------
socket client impl
socket input stream
exception chain
Modified Paths:
--------------
net.sourceforge.progress.jms/src/net/sourceforge/progress/net/ConnectException.cls
net.sourceforge.progress.jms/src/net/sourceforge/progress/net/ServerSocket.cls
net.sourceforge.progress.jms/src/net/sourceforge/progress/net/Socket.cls
net.sourceforge.progress.jms/src/net/sourceforge/progress/net/SocketEventHandler.cls
net.sourceforge.progress.jms/src/net/sourceforge/progress/net/SocketEventHandlerHelper.p
net.sourceforge.progress.jms/src/net/sourceforge/progress/net/SocketException.cls
net.sourceforge.progress.jms/src/net/sourceforge/progress/net/SocketImpl.cls
net.sourceforge.progress.jms/src/net/sourceforge/progress/net/SocketInputStream.cls
net.sourceforge.progress.jms/src/net/sourceforge/progress/net/SocketOptions.cls
Added Paths:
-----------
net.sourceforge.progress.jms/src/net/sourceforge/progress/net/ClientSocketImpl.cls
net.sourceforge.progress.jms/src/net/sourceforge/progress/net/ReadResponseSubscriber.cls
Removed Paths:
-------------
net.sourceforge.progress.jms/src/net/sourceforge/progress/net/BufferedSocketInputStream.cls
net.sourceforge.progress.jms/src/net/sourceforge/progress/net/ReadResponseHandler.cls
Deleted: net.sourceforge.progress.jms/src/net/sourceforge/progress/net/BufferedSocketInputStream.cls
===================================================================
--- net.sourceforge.progress.jms/src/net/sourceforge/progress/net/BufferedSocketInputStream.cls 2011-07-05 08:20:25 UTC (rev 91)
+++ net.sourceforge.progress.jms/src/net/sourceforge/progress/net/BufferedSocketInputStream.cls 2011-07-05 08:31:30 UTC (rev 92)
@@ -1,48 +0,0 @@
-/*------------------------------------------------------------------------
- File : BufferedSocketInputStream
- Purpose :
- Syntax :
- Description :
- Author(s) : Marian Edu
- Created : Sun Sep 26 18:37:08 EEST 2010
- Notes :
-
- Email : mar...@gm...
- Website : www.ganimede.ro
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the Lesser GNU 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 program 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
- Lesser GNU General Public License for more details.
- You should have received a copy of the Lesser GNU General Public License
- along with this program. If not, see < http://www.gnu.org/licenses/>.
-
- ----------------------------------------------------------------------*/
-
-using net.sourceforge.progress.io.*.
-using net.sourceforge.progress.net.*.
-
-routine-level on error undo, throw.
-
-class net.sourceforge.progress.net.BufferedSocketInputStream
- inherits BufferedInputStream
- implements ReadResponseHandler :
-
- constructor public BufferedSocketInputStream ( input str as InputStream, input size as integer ):
- super (input str, input size).
- end constructor.
-
- constructor public BufferedSocketInputStream ( input str as InputStream ):
- super (input str).
- end constructor.
-
- method public void handleReadResponse( input socket as Socket ):
- /* we have data, put incomming message in buffer */
- fillBuffer().
- end method.
-
-end class.
\ No newline at end of file
Added: net.sourceforge.progress.jms/src/net/sourceforge/progress/net/ClientSocketImpl.cls
===================================================================
--- net.sourceforge.progress.jms/src/net/sourceforge/progress/net/ClientSocketImpl.cls (rev 0)
+++ net.sourceforge.progress.jms/src/net/sourceforge/progress/net/ClientSocketImpl.cls 2011-07-05 08:31:30 UTC (rev 92)
@@ -0,0 +1,154 @@
+/*------------------------------------------------------------------------
+ File : ClientSocketImpl
+ Purpose :
+ Syntax :
+ Description : This class is the base of all client streaming socket
+ implementation classes.
+ Author(s) : Marian Edu
+ Created : Tue Apr 26 21:01:09 EEST 2011
+ Notes :
+
+ Email : mar...@gm...
+ Website : www.ganimede.ro
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the Lesser GNU 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 program 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
+ Lesser GNU General Public License for more details.
+ You should have received a copy of the Lesser GNU General Public License
+ along with this program. If not, see < http://www.gnu.org/licenses/>.
+ ----------------------------------------------------------------------*/
+
+using net.sourceforge.progress.net.*.
+using net.sourceforge.progress.io.*.
+using net.sourceforge.progress.lang.*.
+
+class net.sourceforge.progress.net.ClientSocketImpl inherits SocketImpl :
+
+ define private variable inStream as InputStream no-undo.
+ define private variable outStream as OutputStream no-undo.
+ define private variable socketObj as Socket no-undo.
+ define private variable readSubscriber as ReadResponseSubscriber no-undo.
+
+ constructor protected ClientSocketImpl ( ):
+ end constructor.
+
+ constructor public ClientSocketImpl ( socketObj as Socket ):
+ this-object:socketObj = socketObj.
+ end constructor.
+
+ destructor public ClientSocketImpl ():
+ if valid-handle(sock) then
+ do:
+ sock:disconnect() no-error.
+ delete object sock.
+ end.
+
+ if valid-object(inStream) then
+ delete object inStream.
+ if valid-object(outStream) then
+ delete object outStream.
+ end destructor.
+
+ method public void close( ):
+
+ if valid-handle(sock) then
+ do:
+ if sock:connected() then
+ sock:disconnect().
+ SocketEventHandler:unsetReadResponse(sock, this-object).
+ end.
+ catch e as Progress.Lang.Error :
+ undo, throw new SocketException(e).
+ end catch.
+
+ end method.
+
+ method public void connect( input remoteHost as character, input serviceName as character, input timeOut as integer ):
+ if timeOut lt 0 then
+ undo, throw new IllegalArgumentException().
+ sock:connect(substitute('-H &1 -S &2':u, remoteHost, serviceName)).
+ catch e as Progress.Lang.Error :
+ undo, throw new ConnectException(e).
+ end catch.
+ end method.
+
+ method public void create ():
+ if not valid-handle(sock) then
+ do:
+ create socket sock.
+ SocketEventHandler:setReadResponse(sock, this-object).
+ end.
+ end method.
+
+ method public void evtReadResponse( input cliSock as handle ):
+ if not valid-handle(cliSock) or cliSock ne sock
+ or not valid-object(readSubscriber) then
+ return.
+
+ readSubscriber:onReadResponse(socketObj).
+
+ catch e as Progress.Lang.Error :
+ undo, throw new SocketException(e).
+ end catch.
+ end method.
+
+ method public handle getFileDescriptor ():
+ return sock.
+ end method.
+
+ method public character getHost( ):
+ if not sock:connected() then
+ return ?.
+ return sock:remote-host.
+ end method.
+
+ method public InputStream getInputStream( ):
+ if not valid-object(inStream) then
+ inStream = new SocketInputStream(this-object).
+ return inStream.
+ end method.
+
+ method public integer getLocalPort( ):
+ if not sock:connected() then
+ return -1.
+ return sock:local-port.
+ end method.
+
+ method public OutputStream getOutputStream( ):
+ if not valid-object(outStream) then
+ outStream = new SocketOutputStream(sock).
+ return outStream.
+ end method.
+
+ method public integer getPort( ):
+ if not sock:connected() then
+ return 0.
+ return sock:remote-port.
+ end method.
+
+ method public Socket getSocket():
+ return socketObj.
+ end method.
+
+ method public void setReadResponseSubscriber (subscriber as ReadResponseSubscriber):
+ readSubscriber = subscriber.
+ end method.
+
+ method public void shutdownInput ():
+ inStream:close().
+ end method.
+
+ method public void shutdownOutput ():
+ outStream:close().
+ end method.
+
+ method public void select ( timeOut as integer ):
+ wait-for 'read-response':u of sock pause timeOut.
+ end method.
+
+end class.
\ No newline at end of file
Modified: net.sourceforge.progress.jms/src/net/sourceforge/progress/net/ConnectException.cls
===================================================================
--- net.sourceforge.progress.jms/src/net/sourceforge/progress/net/ConnectException.cls 2011-07-05 08:20:25 UTC (rev 91)
+++ net.sourceforge.progress.jms/src/net/sourceforge/progress/net/ConnectException.cls 2011-07-05 08:31:30 UTC (rev 92)
@@ -28,17 +28,20 @@
class net.sourceforge.progress.net.ConnectException inherits SocketException :
- constructor public ConnectException ( input p0 as character, input p1 as integer ):
- super (input p0, input p1).
- end constructor.
+ constructor public ConnectException ( ):
+ super ().
+ end constructor.
- constructor public ConnectException ( input p0 as character ):
- super (input p0).
- end constructor.
+ constructor public ConnectException ( input errMsg as character ):
+ super (input errMsg).
+ end constructor.
+ constructor public ConnectException ( input errMsg as character, input cause as Progress.Lang.Error ):
+ super (input errMsg, input cause).
+ end constructor.
- constructor public ConnectException ( ):
- super ().
- end constructor.
+ constructor public ConnectException ( input cause as Progress.Lang.Error ):
+ super (input cause).
+ end constructor.
end class.
\ No newline at end of file
Deleted: net.sourceforge.progress.jms/src/net/sourceforge/progress/net/ReadResponseHandler.cls
===================================================================
--- net.sourceforge.progress.jms/src/net/sourceforge/progress/net/ReadResponseHandler.cls 2011-07-05 08:20:25 UTC (rev 91)
+++ net.sourceforge.progress.jms/src/net/sourceforge/progress/net/ReadResponseHandler.cls 2011-07-05 08:31:30 UTC (rev 92)
@@ -1,32 +0,0 @@
-/*------------------------------------------------------------------------
- File : ReadResponseHandler
- Purpose :
- Syntax :
- Description : Handler of read response client socket event.
- Author(s) : Marian Edu
- Created : Sun Sep 26 18:44:13 EEST 2010
- Notes :
-
- Email : mar...@gm...
- Website : www.ganimede.ro
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the Lesser GNU 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 program 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
- Lesser GNU General Public License for more details.
- You should have received a copy of the Lesser GNU General Public License
- along with this program. If not, see < http://www.gnu.org/licenses/>.
-
- ----------------------------------------------------------------------*/
-
-using net.sourceforge.progress.net.Socket.
-
-interface net.sourceforge.progress.net.ReadResponseHandler:
-
- method public void handleReadResponse(socket as Socket).
-
-end interface.
\ No newline at end of file
Copied: net.sourceforge.progress.jms/src/net/sourceforge/progress/net/ReadResponseSubscriber.cls (from rev 75, net.sourceforge.progress.jms/src/net/sourceforge/progress/net/ReadResponseHandler.cls)
===================================================================
--- net.sourceforge.progress.jms/src/net/sourceforge/progress/net/ReadResponseSubscriber.cls (rev 0)
+++ net.sourceforge.progress.jms/src/net/sourceforge/progress/net/ReadResponseSubscriber.cls 2011-07-05 08:31:30 UTC (rev 92)
@@ -0,0 +1,32 @@
+/*------------------------------------------------------------------------
+ File : ReadResponseSubscriber
+ Purpose :
+ Syntax :
+ Description : Observer for read response client socket event.
+ Author(s) : Marian Edu
+ Created : Sun Sep 26 18:44:13 EEST 2010
+ Notes :
+
+ Email : mar...@gm...
+ Website : www.ganimede.ro
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the Lesser GNU 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 program 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
+ Lesser GNU General Public License for more details.
+ You should have received a copy of the Lesser GNU General Public License
+ along with this program. If not, see < http://www.gnu.org/licenses/>.
+
+ ----------------------------------------------------------------------*/
+
+using net.sourceforge.progress.net.Socket.
+
+interface net.sourceforge.progress.net.ReadResponseSubscriber:
+
+ method public void onReadResponse (sock as Socket).
+
+end interface.
\ No newline at end of file
Modified: net.sourceforge.progress.jms/src/net/sourceforge/progress/net/ServerSocket.cls
===================================================================
--- net.sourceforge.progress.jms/src/net/sourceforge/progress/net/ServerSocket.cls 2011-07-05 08:20:25 UTC (rev 91)
+++ net.sourceforge.progress.jms/src/net/sourceforge/progress/net/ServerSocket.cls 2011-07-05 08:31:30 UTC (rev 92)
@@ -23,12 +23,30 @@
----------------------------------------------------------------------*/
-using net.sourceforge.progress.net.SocketImpl.
+using net.sourceforge.progress.net.*.
routine-level on error undo, throw.
class net.sourceforge.progress.net.ServerSocket inherits SocketImpl :
+ method public Socket accept( ):
+ end method.
+
+ method public void bind( lport as integer):
+ end method.
+
+ method public void listen (backlog as integer):
+ end method.
+
+ method public void evtConnect( input srvSocket as handle, input cliSock as handle ):
+ if not valid-handle(srvSocket) or
+ srvSocket ne sock or
+ not valid-handle(cliSock) then
+ return.
+
+ catch e as Progress.Lang.Error :
+ undo, throw new SocketException(e).
+ end catch.
+ end method.
-
end class.
\ No newline at end of file
Modified: net.sourceforge.progress.jms/src/net/sourceforge/progress/net/Socket.cls
===================================================================
--- net.sourceforge.progress.jms/src/net/sourceforge/progress/net/Socket.cls 2011-07-05 08:20:25 UTC (rev 91)
+++ net.sourceforge.progress.jms/src/net/sourceforge/progress/net/Socket.cls 2011-07-05 08:31:30 UTC (rev 92)
@@ -29,29 +29,29 @@
routine-level on error undo, throw.
-class net.sourceforge.progress.net.Socket
- inherits SocketImpl final:
-
- define private variable isCreated as logical no-undo.
- define private variable isConnected as logical no-undo.
- define private variable isClosed as logical no-undo.
- define private variable isInputClosed as logical no-undo.
- define private variable isOutputClosed as logical no-undo.
+class net.sourceforge.progress.net.Socket final:
+
+ define private variable sockImpl as ClientSocketImpl no-undo.
+ define private variable isCreated as logical no-undo.
+ define private variable isConnected as logical no-undo.
+ define private variable isClosed as logical no-undo.
+ define private variable isInputClosed as logical no-undo.
+ define private variable isOutputClosed as logical no-undo.
- define private property inStream as InputStream no-undo
+ define public property receiveTimeout as integer no-undo
get.
- set.
-
- define private property outStream as OutputStream no-undo
- get.
- set.
+ private set (val as integer):
+ if val eq ? then
+ return.
+ setOption(SocketOptions:SO_TIMEOUT, string(val)).
+ receiveTimeout = val.
+ catch e as Progress.Lang.Error :
+ delete object e.
+ end catch.
+ end.
- define public property readResponseHandler as ReadResponseHandler no-undo
- get.
- set.
-
constructor public Socket ( input remoteHost as character, input remotePort as integer, input timeOut as integer ):
- connect(remoteHost, remotePort, timeOut).
+ this-object(remoteHost, string(remotePort), timeOut).
end constructor.
constructor public Socket ( input remoteHost as character, input remotePort as integer ):
@@ -59,221 +59,229 @@
end constructor.
constructor public Socket ( input remoteHost as character, input serviceName as character, input timeOut as integer ):
+ this-object().
+
connect(remoteHost, serviceName, timeOut).
+
+ catch e as Progress.Lang.Error :
+ undo, throw new SocketException(e).
+ end catch.
end constructor.
constructor public Socket ( input remoteHost as character, input serviceName as character ):
this-object(remoteHost, serviceName, ?).
end constructor.
- constructor public Socket ( input sockImpl as handle ):
- assign
- sock = sockImpl
- isCreated = true
- isConnected = sock:connected().
+ constructor public Socket ( input sockImpl as ClientSocketImpl ):
+ if not valid-object(sockImpl) then
+ undo, throw new SocketException().
- catch e as Progress.Lang.Error :
- delete object e.
- undo, throw new SocketException().
- end catch.
+ this-object:sockImpl = sockImpl.
end constructor.
+
+ constructor public Socket ( ):
+ sockImpl = new ClientSocketImpl (this-object).
+ receiveTimeout = 30.
+ end constructor.
- method override public void close( ):
+ method public void close( ):
+ if isClosed then
+ return.
isClosed = true.
-
- if isConnected then
- sock:disconnect().
- SocketEventHandler:unsetReadResponse(sock, this-object).
- catch e as Progress.Lang.Error :
- delete object e.
- undo, throw new SocketException().
- end catch.
-
+ sockImpl:close().
end method.
-
- method override public void connect( input remoteHost as character, input remotePort as integer, input timeOut as integer ):
-
- if timeOut lt 0 then
- undo, throw new IllegalArgumentException().
- checkClosedAndCreate(true).
- if timeOut ne ? then
- receiveTimeout = timeOut.
-
- sock:connect(substitute('-H &1 -S &2':u, remoteHost, remotePort)).
- assign
- address = sock:remote-host
- port = sock:remote-port
- localPort = sock:local-port.
-
- catch e as Progress.Lang.Error :
- delete object e.
- undo, throw new ConnectException().
- end catch.
- end method.
- method override public void connect( input remoteHost as character, input serviceName as character, input timeOut as integer ):
+ method private void checkClosedAndCreate (doCreate as logical):
+ if isClosed then
+ undo, throw new SocketException().
- if timeOut lt 0 then
- undo, throw new IllegalArgumentException().
+ if not doCreate then
+ do:
+ if not isConnected then
+ undo, throw new SocketException().
+ return.
+ end.
- checkClosedAndCreate(true).
-
- if timeOut ne ? then
- receiveTimeout = timeOut.
-
- sock:connect(substitute('-H &1 -S &2':u, remoteHost, serviceName)).
- assign
- address = sock:remote-host
- port = sock:remote-port
- localPort = sock:local-port.
-
- catch e as Progress.Lang.Error :
- delete object e.
- undo, throw new ConnectException().
- end catch.
- end method.
-
- method override protected void create( ):
if not isCreated then
do:
- create socket sock.
- SocketEventHandler:setReadResponse(sock, this-object).
+ sockImpl:create().
isCreated = true.
- end.
-
- catch e as Progress.Lang.Error :
- delete object e.
- undo, throw new SocketException().
- end catch.
+ end.
end method.
- method override public void evtReadResponse( input cliSock as handle ):
- if cliSock eq ? or cliSock ne sock then
- return.
-
- if valid-object(readResponseHandler) then
- readResponseHandler:handleReadResponse(this-object).
+ method public void connect( input remoteHost as character, input remotePort as integer):
+ connect(remoteHost, string(remotePort), ?).
end method.
+
+ method public void connect( input remoteHost as character, input remotePort as integer, input timeOut as integer ):
+ connect(remoteHost, string(remotePort), timeOut).
+ end method.
+
+ method public void connect( input remoteHost as character, input serviceName as character):
+ connect(remoteHost, serviceName, ?).
+ end method.
+
+ method public void connect( input remoteHost as character, input serviceName as character, input timeOut as integer ):
+ checkClosedAndCreate(true).
+ sockImpl:connect(remoteHost, serviceName, timeOut).
+ isConnected = true.
+ end method.
- method override public InputStream getInputStream( ):
- if not valid-object(inStream) then
- inStream = new SocketInputStream(sock).
- return inStream.
+ method public InputStream getInputStream( ):
+ checkClosedAndCreate(false).
+ if isInputShutdown() then
+ undo, throw new SocketException().
+
+ return sockImpl:getInputStream().
end method.
- method override public integer getLocalPort( ):
+ method public integer getLocalPort( ):
if not isConnected then
return -1.
- return super:getLocalPort().
+ return sockImpl:getLocalPort().
end method.
- method override public OutputStream getOutputStream( ):
- if not valid-object(outStream) then
- outStream = new SocketOutputStream(sock).
- return outStream.
+ method public OutputStream getOutputStream( ):
+ checkClosedAndCreate(false).
+ if isOutputShutdown() then
+ undo, throw new SocketException().
+
+ return sockImpl:getOutputStream().
end method.
method public logical getKeepAlive ():
checkClosedAndCreate(true).
- return logical(getOption(SO_KEEPALIVE)).
+ return logical(getOption(SocketOptions:SO_KEEPALIVE)).
end method.
- method override protected integer getPort( ):
+ method public integer getPort( ):
if not isConnected then
return 0.
- return super:getPort().
+ return sockImpl:getPort().
end method.
method public logical getSoLinger ():
checkClosedAndCreate(true).
- return logical(getOption(SO_LINGER)).
+ return logical(getOption(SocketOptions:SO_LINGER)).
end method.
method public integer getReceiveBufferSize ():
checkClosedAndCreate(true).
- return integer(getOption(SO_RCVBUF)).
+ return integer(getOption(SocketOptions:SO_RCVBUF)).
end method.
method public integer getSendBufferSize ():
checkClosedAndCreate(true).
- return integer(getOption(SO_SNDBUF)).
+ return integer(getOption(SocketOptions:SO_SNDBUF)).
end method.
method public integer getSoTimeout ():
checkClosedAndCreate(true).
- return integer(getOption(SO_TIMEOUT)).
+ return integer(getOption(SocketOptions:SO_TIMEOUT)).
end method.
method public logical getTcpNoDelay ():
checkClosedAndCreate(true).
- return logical(getOption(TCP_NODELAY)).
+ return logical(getOption(SocketOptions:TCP_NODELAY)).
end method.
method public logical getReuseAddress ():
checkClosedAndCreate(true).
- return logical(getOption(SO_REUSEADDR)).
+ return logical(getOption(SocketOptions:SO_REUSEADDR)).
end method.
+
+ method public character getOption (opt as character):
+ return sockImpl:getOption(opt).
+ end method.
- method public void setKeepAlive (opt as logical):
+ method public logical isClosed ():
+ return isClosed.
+ end method.
+
+ method public logical isConnected ():
+ return isConnected.
+ end method.
+
+ method public logical isInputShutdown ():
+ return isInputClosed.
+ end method.
+
+ method public logical isOutputShutdown ():
+ return isOutputClosed.
+ end method.
+
+ method public void select ( timeOut as integer ):
+ checkClosedAndCreate(false).
+ sockImpl:select(timeOut).
+ end method.
+
+ method public void setReadResponseSubscriber (subscriber as ReadResponseSubscriber):
checkClosedAndCreate(true).
- setOption(SO_KEEPALIVE, string(opt, 'true/false':u)).
+ sockImpl:setReadResponseSubscriber(subscriber).
end method.
-
- method public void setReadResponseHandler( rspHandler as ReadResponseHandler ):
- readResponseHandler = rspHandler.
+ method public void setKeepAlive (opt as logical):
+ setOption(SocketOptions:SO_KEEPALIVE, string(opt, 'true/false':u)).
end method.
-
method public void setSendBufferSize (opt as integer):
if opt le 0 then
undo, throw new IllegalArgumentException().
- checkClosedAndCreate(true).
- setOption(SO_SNDBUF, string(opt)).
+ setOption(SocketOptions:SO_SNDBUF, string(opt)).
end method.
method public void setReceiveBufferSize (opt as integer):
if opt le 0 then
undo, throw new IllegalArgumentException().
- checkClosedAndCreate(true).
- setOption(SO_RCVBUF, string(opt)).
+ setOption(SocketOptions:SO_RCVBUF, string(opt)).
end method.
method public void setSoLinger (opt as logical, linger as integer):
- if opt and linger lt 0 then
+ if opt and linger eq ? then
undo, throw new IllegalArgumentException().
- checkClosedAndCreate(true).
linger = if opt then maximum(linger, 65535) else -1.
- setOption(SO_LINGER, substitute('&1,&2', string(opt, 'true/false':u), linger)).
+ setOption(SocketOptions:SO_LINGER, substitute('&1,&2', string(opt, 'true/false':u), linger)).
end method.
method public void setSoTimeout (opt as integer):
if opt lt 0 then
undo, throw new IllegalArgumentException().
- checkClosedAndCreate(true).
- setOption(SO_TIMEOUT, string(opt)).
+ setOption(SocketOptions:SO_TIMEOUT, string(opt)).
end method.
method public void setTcpNoDelay (opt as logical):
- checkClosedAndCreate(true).
- setOption(TCP_NODELAY, string(opt, 'true/false':u)).
+ setOption(SocketOptions:TCP_NODELAY, string(opt, 'true/false':u)).
end method.
method public void setReuseAddress (opt as logical):
- checkClosedAndCreate(true).
- setOption(SO_REUSEADDR, string(opt, 'true/false':u)).
+ setOption(SocketOptions:SO_REUSEADDR, string(opt, 'true/false':u)).
end method.
+ method public void setOption (opt as character, val as integer):
+ setOption(opt, string(val)).
+ end method.
+
+ method public void setOption (opt as character, val as logical):
+ setOption(opt, string(val, 'true/false':u)).
+ end method.
+
+ method public void setOption (opt as character, val as character):
+ if opt eq ? or val eq ? then
+ undo, throw new IllegalArgumentException().
+ checkClosedAndCreate(true).
+ sockImpl:setOption(opt, val).
+ end method.
+
method public void shutdownInput ():
if isInputClosed then
undo, throw new SocketException().
checkClosedAndCreate(false).
- inStream:close().
+ sockImpl:shutdownInput().
isInputClosed = true.
end method.
@@ -282,58 +290,15 @@
undo, throw new SocketException().
checkClosedAndCreate(false).
- outStream:close().
+ sockImpl:shutdownOutput().
isOutputClosed = true.
end method.
- method public logical isConnected ():
- return isConnected.
+ method public void subscribeToReadResponse (subscriber as ReadResponseSubscriber):
end method.
-
- method public logical isInputShutdown ():
- return isInputClosed.
- end method.
-
- method public logical isOutputShutdown ():
- return isOutputClosed.
- end method.
-
- method private void checkClosedAndCreate (doCreate as logical):
- if isClosed then
- undo, throw new SocketException().
-
- if not isCreated then
- do:
- if not doCreate then
- undo, throw new SocketException().
- this-object:create().
- end.
-
- catch e as Progress.Lang.Error :
- delete object e.
- undo, throw new SocketException().
- end catch.
-
- end method.
-
- method public void waitForResponse( timeOut as integer ):
-
- checkClosedAndCreate(false).
-
- wait-for 'read-response':u of sock pause timeOut.
- end method.
destructor public Socket ( ):
- if valid-handle(sock) then
- do:
- sock:disconnect() no-error.
- delete object sock.
- end.
-
- if valid-object(inStream) then
- delete object inStream.
- if valid-object(outStream) then
- delete object outStream.
+ delete object sockImpl no-error.
end destructor.
end class.
\ No newline at end of file
Modified: net.sourceforge.progress.jms/src/net/sourceforge/progress/net/SocketEventHandler.cls
===================================================================
--- net.sourceforge.progress.jms/src/net/sourceforge/progress/net/SocketEventHandler.cls 2011-07-05 08:20:25 UTC (rev 91)
+++ net.sourceforge.progress.jms/src/net/sourceforge/progress/net/SocketEventHandler.cls 2011-07-05 08:31:30 UTC (rev 92)
@@ -48,19 +48,17 @@
set.
define static private property myGuid as character no-undo
- get:
- if myGuid eq '':u then
- myGuid = guid.
- return myGuid.
- end get.
+ get.
set.
constructor private SocketEventHandler ( ):
+ assign
+ myGuid = guid
+ socketMap = new StringHashMap().
+
run net/sourceforge/progress/net/SocketEventHandlerHelper.p
persistent set eventHndl (this-object, myGuid).
- socketMap = new StringHashMap().
-
if not valid-handle(eventHndl) or not valid-object(socketMap) then
undo, throw new NullPointerException().
@@ -73,36 +71,40 @@
end method.
method public void evtReadResponse (cliSock as handle, pass as character):
- define variable sockImpl as SocketImpl no-undo.
+ define variable sock as ClientSocketImpl no-undo.
if pass ne myGuid or
- not valid-handle(cliSock) then
+ not valid-handle(cliSock) or
+ cliSock:type ne 'socket':u then
return.
- sockImpl = cast(socketMap:get(string(cliSock:handle)), 'SocketImpl':u) no-error.
+ sock = cast(socketMap:get(string(cliSock:handle)), 'ClientSocketImpl':u) no-error.
- if valid-object(sockImpl) then
- sockImpl:evtReadResponse(cliSock).
+ if valid-object(sock) then
+ sock:evtReadResponse(cliSock).
end method.
method public void evtConnect (srvSock as handle, cliSock as handle, pass as character):
- define variable sockImpl as SocketImpl no-undo.
+ define variable sock as ServerSocket no-undo.
if pass ne myGuid or
not valid-handle(srvSock) or
- not valid-handle(cliSock) then
+ srvSock:type ne 'server-socket':u or
+ not valid-handle(cliSock) or
+ cliSock:type ne 'socket':u then
return.
- sockImpl = cast(socketMap:get(string(srvSock:handle)), 'SocketImpl':u) no-error.
+ sock = cast(socketMap:get(string(srvSock:handle)), 'ServerSocket':u) no-error.
- if valid-object(sockImpl) then
- sockImpl:evtConnect(srvSock, cliSock).
+ if valid-object(sock) then
+ sock:evtConnect(srvSock, cliSock).
end method.
- method static public void setReadResponse (cliSock as handle, sockImpl as SocketImpl):
- if not valid-handle (cliSock) or
+ method static public void setReadResponse (cliSock as handle, sockImpl as ClientSocketImpl):
+ if not valid-handle (cliSock) or
+ cliSock:type ne 'socket':u or
not valid-object (sockImpl) then
undo, throw new NullPointerException().
@@ -113,13 +115,13 @@
socketMap:put(string(cliSock:handle), sockImpl).
catch e as Progress.Lang.Error :
- delete object e.
- undo, throw new SocketException().
+ undo, throw new SocketException(e).
end catch.
end method.
- method static public void setConnect (srvSock as handle, sockImpl as SocketImpl):
- if not valid-handle (srvSock) or
+ method static public void setConnect (srvSock as handle, sockImpl as ServerSocket):
+ if not valid-handle (srvSock) or
+ srvSock:type ne 'server-socket':u or
not valid-object (sockImpl) then
undo, throw new NullPointerException().
@@ -130,13 +132,13 @@
socketMap:put(string(srvSock:handle), sockImpl).
catch e as Progress.Lang.Error :
- delete object e.
- undo, throw new SocketException().
+ undo, throw new SocketException(e).
end catch.
end method.
- method static public void unsetReadResponse (cliSock as handle, sockImpl as SocketImpl):
- if not valid-handle (cliSock) or
+ method static public void unsetReadResponse (cliSock as handle, sockImpl as ClientSocketImpl):
+ if not valid-handle (cliSock) or
+ cliSock:type ne 'socket':u or
not valid-object (sockImpl) then
undo, throw new NullPointerException().
@@ -144,13 +146,13 @@
socketMap:remove(string(cliSock:handle)).
catch e as Progress.Lang.Error :
- delete object e.
- undo, throw new SocketException().
+ undo, throw new SocketException(e).
end catch.
end method.
- method static public void unsetConnect (srvSock as handle, sockImpl as SocketImpl):
- if not valid-handle (srvSock) or
+ method static public void unsetConnect (srvSock as handle, sockImpl as ServerSocket):
+ if not valid-handle (srvSock) or
+ srvSock:type ne 'server-socket':u or
not valid-object (sockImpl) then
undo, throw new NullPointerException().
@@ -158,8 +160,7 @@
socketMap:remove(string(srvSock:handle)).
catch e as Progress.Lang.Error :
- delete object e.
- undo, throw new SocketException().
+ undo, throw new SocketException(e).
end catch.
end method.
Modified: net.sourceforge.progress.jms/src/net/sourceforge/progress/net/SocketEventHandlerHelper.p
===================================================================
--- net.sourceforge.progress.jms/src/net/sourceforge/progress/net/SocketEventHandlerHelper.p 2011-07-05 08:20:25 UTC (rev 91)
+++ net.sourceforge.progress.jms/src/net/sourceforge/progress/net/SocketEventHandlerHelper.p 2011-07-05 08:31:30 UTC (rev 92)
@@ -42,11 +42,13 @@
return error.
procedure evtReadResponse:
- evtHandler:evtReadResponse(self, passwd).
+ if valid-object(evtHandler) then
+ evtHandler:evtReadResponse(self, passwd).
end procedure.
procedure evtConnect:
define input parameter cliSock as handle no-undo.
- evtHandler:evtConnect(self, cliSock, passwd).
+ if valid-object(evtHandler) then
+ evtHandler:evtConnect(self, cliSock, passwd).
end procedure.
Modified: net.sourceforge.progress.jms/src/net/sourceforge/progress/net/SocketException.cls
===================================================================
--- net.sourceforge.progress.jms/src/net/sourceforge/progress/net/SocketException.cls 2011-07-05 08:20:25 UTC (rev 91)
+++ net.sourceforge.progress.jms/src/net/sourceforge/progress/net/SocketException.cls 2011-07-05 08:31:30 UTC (rev 92)
@@ -23,21 +23,24 @@
----------------------------------------------------------------------*/
-using Progress.Lang.AppError.
+using net.sourceforge.progress.lang.Exception.
-class net.sourceforge.progress.net.SocketException inherits AppError :
+class net.sourceforge.progress.net.SocketException inherits Exception :
- constructor public SocketException ( input p0 as character ):
- super (input p0).
+ constructor public SocketException ( ):
+ super ().
end constructor.
-
- constructor public SocketException ( input p0 as character, input p1 as integer ):
- super (input p0, input p1).
+ constructor public SocketException ( input errMsg as character ):
+ super (input errMsg).
end constructor.
-
- constructor public SocketException ( ):
- super ().
+
+ constructor public SocketException ( input errMsg as character, input cause as Progress.Lang.Error ):
+ super (input errMsg, input cause).
end constructor.
+ constructor public SocketException ( input cause as Progress.Lang.Error ):
+ super (input cause).
+ end constructor.
+
end class.
\ No newline at end of file
Modified: net.sourceforge.progress.jms/src/net/sourceforge/progress/net/SocketImpl.cls
===================================================================
--- net.sourceforge.progress.jms/src/net/sourceforge/progress/net/SocketImpl.cls 2011-07-05 08:20:25 UTC (rev 91)
+++ net.sourceforge.progress.jms/src/net/sourceforge/progress/net/SocketImpl.cls 2011-07-05 08:31:30 UTC (rev 92)
@@ -31,106 +31,27 @@
using net.sourceforge.progress.io.InputStream.
using net.sourceforge.progress.io.OutputStream.
-class net.sourceforge.progress.net.SocketImpl
- inherits net.sourceforge.progress.net.SocketOptions:
+class net.sourceforge.progress.net.SocketImpl:
define protected property sock as handle no-undo
get.
set.
-
- define protected property address as character no-undo
- get.
- set.
-
- define protected property port as integer no-undo
- get.
- set.
- define protected property localPort as integer no-undo
- get.
- set.
-
- define protected property receiveTimeout as integer no-undo initial ?
- get.
- set (val as integer):
- if val eq ? then
- return.
- setOption(SO_TIMEOUT, string(val)).
- receiveTimeout = val.
- catch e as Progress.Lang.Error :
- delete object e.
- end catch.
- end.
-
constructor protected SocketImpl ( ):
end constructor.
-
- method protected SocketImpl accept( ):
- end method.
-
- method protected void bind( lport as integer):
- end method.
-
- method protected void close( ):
- end method.
-
- method protected void connect( remoteHost as character, remotePort as integer ):
- this-object:connect(remoteHost, remotePort, ?).
- end method.
-
- method protected void connect( remoteHost as character, remotePort as integer, timeOut as integer ):
- end method.
-
- method protected void connect( remoteHost as character, serviceName as character ):
- this-object:connect(remoteHost, serviceName, ?).
- end method.
-
- method protected void connect( remoteHost as character, serviceName as character, timeOut as integer ):
- end method.
-
- method protected void create ():
- end method.
-
- method public void evtReadResponse (cliSock as handle):
-
- end method.
-
- method public void evtConnect (srvSock as handle, cliSock as handle):
-
- end method.
-
- method protected InputStream getInputStream ():
- end method.
-
- method protected integer getLocalPort( ):
- return localPort.
- end method.
-
- method override public character getOption( input opt as character ):
+ method public character getOption( input opt as character ):
if valid-handle(sock) then
return sock:get-socket-option(opt).
undo, throw new SocketException().
end method.
-
- method protected OutputStream getOutputStream ():
- end method.
-
- method protected integer getPort( ):
- return port.
- end method.
-
- method protected void listen (backlog as integer):
- end method.
- method override public void setOption( input opt as character, input val as character ):
-
+ method public void setOption( input opt as character, input val as character ):
sock:set-socket-option(opt, val).
catch e as Progress.Lang.Error :
- delete object e.
- undo, throw new SocketException().
+ undo, throw new SocketException(e).
end catch.
end method.
Modified: net.sourceforge.progress.jms/src/net/sourceforge/progress/net/SocketInputStream.cls
===================================================================
--- net.sourceforge.progress.jms/src/net/sourceforge/progress/net/SocketInputStream.cls 2011-07-05 08:20:25 UTC (rev 91)
+++ net.sourceforge.progress.jms/src/net/sourceforge/progress/net/SocketInputStream.cls 2011-07-05 08:31:30 UTC (rev 92)
@@ -24,7 +24,7 @@
----------------------------------------------------------------------*/
-
+using net.sourceforge.progress.net.*.
using net.sourceforge.progress.io.*.
using net.sourceforge.progress.lang.*.
@@ -32,109 +32,116 @@
class net.sourceforge.progress.net.SocketInputStream inherits InputStream :
- define protected property inSocket as handle no-undo
- get.
- private set.
-
- define protected property buf as memptr no-undo
- get.
- set.
-
- define protected property isClosed as logical no-undo
- get.
- set.
+ define private variable impl as ClientSocketImpl no-undo.
+ define private variable socketObj as Socket no-undo.
+ define private variable inSocket as handle no-undo.
+ define private variable timeOut as integer no-undo.
+ define private variable eof as logical no-undo.
- constructor public SocketInputStream ( sock as handle ):
- super ().
- if not valid-handle(sock) then
+ constructor public SocketInputStream ( impl as ClientSocketImpl ):
+ if not valid-object(impl) then
undo, throw new NullPointerException().
- if sock:type ne 'socket':u then
- undo, throw new IllegalArgumentException().
- inSocket = sock.
- set-size(buf) = 1.
+
+ assign
+ this-object:impl = impl
+ socketObj = impl:getSocket()
+ inSocket = impl:getFileDescriptor()
+ timeOut = socketObj:receiveTimeout.
end constructor.
method override public integer available( ):
- checkClosed().
return inSocket:get-bytes-available().
end method.
-
+
method override public void close( ):
- isClosed = true.
+ if valid-object(socketObj) and not socketObj:isClosed() then
+ socketObj:close().
+ else
+ impl:close().
end method.
- method override public void mark( input limit as integer ):
- undo, throw new IOException().
- end method.
-
method override public integer read( ):
- checkClosed().
+ define variable tmpBuf as memptr no-undo.
+
+ set-size(tmpBuf) = 1.
+ if this-object:read(tmpBuf) le 0 then
+ return -1.
- inSocket:read(buf, 1, 1, read-available) no-error.
- if inSocket:bytes-read eq 1 then
- return get-byte(buf, 1).
- return -1.
+ return get-byte(tmpBuf, 1).
+
+ finally:
+ set-size(tmpBuf) = 0.
+ end finally.
end method.
method override public integer read( input bytes as memptr, input offset as integer, input len as integer ):
- define variable copyLen as integer no-undo.
-
+ define variable readLen as integer no-undo.
+ define variable byteAvail as integer no-undo.
+ define variable timeLeft as integer no-undo.
+
+ if eof eq true then
+ return -1.
+
if bytes eq ? or offset eq ? or len eq ? then
undo, throw new NullPointerException().
-
+
if len eq 0 then
return 0.
-
+
if offset lt 0 or len lt 0 or offset + len gt get-size(bytes) then
undo, throw new ArrayIndexOutOfBoundsException().
- checkClosed().
+
+ timeLeft = timeOut * 1000 + etime.
+ pause 0 before-hide.
+ do while timeLeft gt etime and inSocket:connected()
+ on error undo, throw:
+ if inSocket:get-bytes-available() gt 0 then do:
+ inSocket:read(bytes, readLen + 1, len - readLen, read-available) no-error.
+ readLen = readLen + inSocket:bytes-read.
+
+ if readLen eq len then
+ return len.
+ end.
+ pause 1 no-message.
- repeat while len gt 0:
- inSocket:read(bytes, offset + 1, len, read-available) no-error.
- if inSocket:bytes-read eq 0 then
- leave.
-
- assign
- copyLen = copyLen + inSocket:bytes-read
- offset = offset + copyLen
- len = len - copyLen.
+ catch e as Progress.Lang.Error :
+ undo, throw new SocketException(e).
+ end catch.
end.
- return if copyLen eq 0 then -1 else copyLen.
+
+ if not inSocket:connected() then
+ undo, throw new SocketException ().
+
+ eof = true.
+ return -1.
end method.
-
- method override public void reset( ):
- undo, throw new IOException().
- end method.
-
+
method override public int64 skip( input len as int64 ):
- define variable skipped as int64 no-undo.
-
+ define variable numRead as integer no-undo.
+ define variable toSkip as integer no-undo.
+ define variable tmpBuf as memptr no-undo.
+
if len eq ? or len le 0 then
return 0.
- checkClosed().
+ assign
+ toSkip = len
+ set-size(tmpBuf) = minimum(len, 1024).
+
+ do while toSkip gt 0:
+ numRead = this-object:read(tmpBuf).
+ /* EOF */
+ if numRead lt 0 then
+ leave.
+ toSkip = toSkip - numRead.
+ end.
+
+ return len - toSkip.
+
+ finally:
+ set-size(tmpBuf) = 0.
+ end finally.
+ end method.
- repeat while len gt 0 and this-object:read() ne -1:
- assign
- skipped = skipped + 1
- len = len - 1.
- end.
- return skipped.
- end method.
-
- method private void checkClosed ():
- if isClosed then
- undo, throw new IOException().
- if not valid-handle(inSocket) or not inSocket:connected() then
- do:
- isClosed = true.
- undo, throw new IOException().
- end.
- end method.
-
- destructor public SocketInputStream ( ):
- set-size(buf) = 0.
- end destructor.
-
end class.
\ No newline at end of file
Modified: net.sourceforge.progress.jms/src/net/sourceforge/progress/net/SocketOptions.cls
===================================================================
--- net.sourceforge.progress.jms/src/net/sourceforge/progress/net/SocketOptions.cls 2011-07-05 08:20:25 UTC (rev 91)
+++ net.sourceforge.progress.jms/src/net/sourceforge/progress/net/SocketOptions.cls 2011-07-05 08:31:30 UTC (rev 92)
@@ -54,15 +54,8 @@
get.
- constructor protected SocketOptions ( ):
+ constructor private SocketOptions ( ):
end constructor.
- method public void setOption (opt as character, val as character):
- undo, throw new SocketException().
- end method.
- method public character getOption (opt as character):
- undo, throw new SocketException().
- end method.
-
end class.
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <me...@us...> - 2011-07-05 08:20:34
|
Revision: 91
http://progress-jms.svn.sourceforge.net/progress-jms/?rev=91&view=rev
Author: medu
Date: 2011-07-05 08:20:25 +0000 (Tue, 05 Jul 2011)
Log Message:
-----------
exception chain
Modified Paths:
--------------
net.sourceforge.progress.jms/src/net/sourceforge/progress/util/AbstractMap.cls
net.sourceforge.progress.jms/src/net/sourceforge/progress/util/ArrayList.cls
net.sourceforge.progress.jms/src/net/sourceforge/progress/util/HashMap/Entry.cls
net.sourceforge.progress.jms/src/net/sourceforge/progress/util/List/Iterator.cls
net.sourceforge.progress.jms/src/net/sourceforge/progress/util/List/ListIterator.cls
net.sourceforge.progress.jms/src/net/sourceforge/progress/util/Map/KeySetIterator.cls
net.sourceforge.progress.jms/src/net/sourceforge/progress/util/Map/ValuesIterator.cls
Modified: net.sourceforge.progress.jms/src/net/sourceforge/progress/util/AbstractMap.cls
===================================================================
--- net.sourceforge.progress.jms/src/net/sourceforge/progress/util/AbstractMap.cls 2011-07-05 08:18:15 UTC (rev 90)
+++ net.sourceforge.progress.jms/src/net/sourceforge/progress/util/AbstractMap.cls 2011-07-05 08:20:25 UTC (rev 91)
@@ -301,8 +301,7 @@
do on error undo, leave:
return this-object:entrySet():iterator().
catch e as Progress.Lang.Error :
- delete object e.
- undo, throw new NullPointerException().
+ undo, throw new NullPointerException(e).
end catch.
end.
end method.
Modified: net.sourceforge.progress.jms/src/net/sourceforge/progress/util/ArrayList.cls
===================================================================
--- net.sourceforge.progress.jms/src/net/sourceforge/progress/util/ArrayList.cls 2011-07-05 08:18:15 UTC (rev 90)
+++ net.sourceforge.progress.jms/src/net/sourceforge/progress/util/ArrayList.cls 2011-07-05 08:20:25 UTC (rev 91)
@@ -33,551 +33,558 @@
routine-level on error undo, throw.
class net.sourceforge.progress.util.ArrayList
- inherits AbstractList:
+ inherits AbstractList:
- define private variable array_ as Array no-undo.
- define private variable firstIndex as integer no-undo.
- define private variable lastIndex as integer no-undo.
+ define private variable array_ as Object no-undo extent.
+ define private variable firstIndex as integer no-undo.
+ define private variable lastIndex as integer no-undo.
- constructor public ArrayList ():
- /* Constructs an empty list with an initial capacity of ten. */
- this-object(10).
- end constructor.
+ constructor public ArrayList ():
+ /* Constructs an empty list with an initial capacity of ten. */
+ this-object(10).
+ end constructor.
- constructor public ArrayList (capacity as integer):
- /* Constructs an empty list with the specified initial capacity. */
- if capacity lt 0 then
- undo, throw new IllegalArgumentException().
- array_ = newElementArray(capacity).
- end constructor.
+ constructor public ArrayList (capacity as integer):
+ /* Constructs an empty list with the specified initial capacity. */
+ if capacity lt 0 then
+ undo, throw new IllegalArgumentException().
+ extent(array_) = capacity.
+ end constructor.
- constructor public ArrayList (collection as Collection):
- /* Constructs a list containing the elements of the specified
- collection, in the order they are returned by the collection's
- iterator. The ArrayList instance has an initial capacity of 110%
- the size of the specified collection. */
+ constructor public ArrayList (collection as Collection):
+ /* Constructs a list containing the elements of the specified
+ collection, in the order they are returned by the collection's
+ iterator. The ArrayList instance has an initial capacity of 110%
+ the size of the specified collection. */
- if not valid-object(collection) then
- undo, throw new NullPointerException().
+ if not valid-object(collection) then
+ undo, throw new NullPointerException().
- assign
- lastIndex = collection:size()
- array_ = newElementArray(integer(lastIndex * 1.1))
- modCount = 1.
- Arrays:copy(collection:toArray(), 0, array_, 0, lastIndex).
- end constructor.
+ assign
+ lastIndex = collection:size()
+ extent(array_) = integer(lastIndex * 1.1)
+ modCount = 1.
+ Arrays:copy(collection:toArray(), 0, array_, 0, lastIndex).
+ end constructor.
-
- method override public logical addAll( input idx as integer, input collection as Collection ):
- define variable dumpArray as Object no-undo extent.
- define variable size as integer no-undo.
- define variable growSize as integer no-undo.
- define variable newFirst as integer no-undo.
- define variable newIdx as integer no-undo.
+ method override public logical addAll( input idx as integer, input collection as Collection ):
+ define variable dumpArray as Object no-undo extent.
+ define variable size as integer no-undo.
+ define variable growSize as integer no-undo.
+ define variable newFirst as integer no-undo.
+ define variable newIdx as integer no-undo.
- if idx lt 0 or idx ge lastIndex - firstIndex then
- undo, throw new IndexOutOfBoundsException().
+ if idx lt 0 or idx ge lastIndex - firstIndex then
+ undo, throw new IndexOutOfBoundsException().
- if not valid-object(collection) then
- undo, throw new NullPointerException().
+ if not valid-object(collection) then
+ undo, throw new NullPointerException().
- if collection:size() eq 0 then
- return false.
+ if collection:size() eq 0 then
+ return false.
- assign
- dumpArray = collection:toArray()
- growSize = extent(dumpArray)
- size = lastIndex - firstIndex.
+ assign
+ dumpArray = collection:toArray()
+ growSize = extent(dumpArray)
+ size = lastIndex - firstIndex.
- case idx:
- when 0 then
+ case idx:
+ when 0 then
+ do:
+ growAtFront(growSize).
+ firstIndex = firstIndex - growSize.
+ end.
+ when size then
+ do:
+ if (lastIndex > extent(array_) - growSize) then
+ growAtEnd(growSize).
+ lastIndex = lastIndex + growSize.
+ end.
+ otherwise
do:
- growAtFront(growSize).
- firstIndex = firstIndex - growSize.
- end.
- when size then
- do:
- if (lastIndex > array_:length() - growSize) then
- growAtEnd(growSize).
- lastIndex = lastIndex + growSize.
- end.
- otherwise
- do:
- if (array_:length() - size < growSize) then
- growForInsert(idx, growSize).
- else
- do:
- newIdx = idx + firstIndex.
- if (idx < size / 2 and firstIndex > 0) or lastIndex > array_:length() - growSize then
- do:
- newFirst = firstIndex - growSize.
- if newFirst lt 0 then
- do:
- Arrays:copy(array_, newIdx, array_, newIdx - newFirst, size - idx).
- assign
- lastIndex = lastIndex - newFirst
- newFirst = 0.
- end.
+ if (extent(array_) - size < growSize) then
+ growForInsert(idx, growSize).
+ else
+ do:
+ newIdx = idx + firstIndex.
+ if (idx < size / 2 and firstIndex > 0) or lastIndex > extent(array_) - growSize then
+ do:
+ newFirst = firstIndex - growSize.
+ if newFirst lt 0 then
+ do:
+ Arrays:copy(array_, newIdx, array_, newIdx - newFirst, size - idx).
+ assign
+ lastIndex = lastIndex - newFirst
+ newFirst = 0.
+ end.
- Arrays:copy(array_, firstIndex, array_, newFirst, idx).
- firstIndex = newFirst.
- end.
- else
- do:
- Arrays:copy(array_, newIdx, array_, newIdx + growSize, size - idx).
- lastIndex = lastIndex + growSize.
- end.
+ Arrays:copy(array_, firstIndex, array_, newFirst, idx).
+ firstIndex = newFirst.
+ end.
+ else
+ do:
+ Arrays:copy(array_, newIdx, array_, newIdx + growSize, size - idx).
+ lastIndex = lastIndex + growSize.
+ end.
+ end.
end.
- end.
- end case.
+ end case.
- Arrays:copy(dumparray, 0, array_, idx + firstIndex, growSize).
- modCount = modCount + 1.
+ Arrays:copy(dumparray, 0, array_, idx + firstIndex, growSize).
+ modCount = modCount + 1.
- return true.
+ return true.
- end method.
+ end method.
- method override public logical addAll( input collection as Collection ):
- define variable dumpArray as Object no-undo extent.
- define variable growSize as integer no-undo.
+ method override public logical addAll( input collection as Collection ):
+ define variable dumpArray as Object no-undo extent.
+ define variable growSize as integer no-undo.
- if not valid-object(collection) then
- undo, throw new NullPointerException().
+ if not valid-object(collection) then
+ undo, throw new NullPointerException().
- if collection:size() eq 0 then
- return false.
+ if collection:size() eq 0 then
+ return false.
- assign
- dumpArray = collection:toArray()
- growSize = extent(dumpArray).
+ assign
+ dumpArray = collection:toArray()
+ growSize = extent(dumpArray).
- if growSize > array_:length() - lastIndex then
- growAtEnd(growSize).
+ if growSize > extent(array_) - lastIndex then
+ growAtEnd(growSize).
- Arrays:copy(dumparray, 0, array_, lastIndex, growSize).
- assign
- lastIndex = lastIndex + growSize
- modCount = modCount + 1.
+ Arrays:copy(dumparray, 0, array_, lastIndex, growSize).
+ assign
+ lastIndex = lastIndex + growSize
+ modCount = modCount + 1.
- return true.
+ return true.
- end method.
-
-
+ end method.
- method override public logical contains( input listItem as Object ):
- define variable i as integer no-undo.
+ method override public logical contains( input listItem as Object ):
+ define variable i as integer no-undo.
- if listItem eq ? then
- do i = 0 to lastIndex - firstIndex - 1:
- if array_:get(i) eq ? then
- return true.
- end.
- else
- do i = 0 to lastIndex - firstIndex - 1:
- if listItem:equals(array_:get(i)) then
- return true.
- end.
- return false.
+ if listItem eq ? then
+ do i = 0 to lastIndex - firstIndex - 1:
+ if array_[i + 1] eq ? then
+ return true.
+ end.
+ else
+ do i = 0 to lastIndex - firstIndex - 1:
+ if listItem:equals(array_[i + 1]) then
+ return true.
+ end.
+ return false.
- end method.
+ end method.
- method override public integer indexOf( input listItem as Object ):
- define variable i as integer no-undo.
+ method override public integer indexOf( input listItem as Object ):
+ define variable i as integer no-undo.
- if listItem eq ? then
- do i = 0 to lastIndex - firstIndex - 1:
- if array_:get(i) eq ? then
- return i.
- end.
- else
- do i = 0 to lastIndex - firstIndex - 1:
- if listItem:equals(array_:get(i)) then
- return i.
- end.
- return -1.
+ if listItem eq ? then
+ do i = 0 to lastIndex - firstIndex - 1:
+ if array_[i + 1] eq ? then
+ return i.
+ end.
+ else
+ do i = 0 to lastIndex - firstIndex - 1:
+ if listItem:equals(array_[i + 1]) then
+ return i.
+ end.
+ return -1.
- end method.
+ end method.
- method override public logical isEmpty( ):
- return firstIndex eq lastIndex.
- end method.
+ method override public logical isEmpty( ):
+ return firstIndex eq lastIndex.
+ end method.
- method override public integer lastIndexOf( input listItem as Object ):
- define variable i as integer no-undo.
+ method override public integer lastIndexOf( input listItem as Object ):
+ define variable i as integer no-undo.
- if listItem eq ? then
- do i = lastIndex - firstIndex - 1 to 0 by -1:
- if array_:get(i) eq ? then
- return i.
- end.
- else
- do i = lastIndex - firstIndex - 1 to 0 by -1:
- if listItem:equals(array_:get(i)) then
- return i.
- end.
- return -1.
- end method.
-
-
- method private Array newElementArray (capacity as integer):
- return new Array(capacity).
- end method.
+ if listItem eq ? then
+ do i = lastIndex - firstIndex - 1 to 0 by -1:
+ if array_[i + 1] eq ? then
+ return i.
+ end.
+ else
+ do i = lastIndex - firstIndex - 1 to 0 by -1:
+ if listItem:equals(array_[i + 1]) then
+ return i.
+ end.
+ return -1.
+ end method.
- method public void ensureCapacity (minCapacity as integer) :
- if array_:length() lt minCapacity then
- do:
- if firstIndex gt 0 then
- growAtFront(minCapacity - array_:length()).
- else
- growAtEnd(minCapacity - array_:length()).
- end.
- end method.
+ method public void ensureCapacity (minCapacity as integer) :
+ if extent(array_) lt minCapacity then
+ do:
+ if firstIndex gt 0 then
+ growAtFront(minCapacity - extent(array_)).
+ else
+ growAtEnd(minCapacity - extent(array_)).
+ end.
+ end method.
- method private void growAtEnd (required as integer):
- define variable size as integer no-undo.
- define variable increment as integer no-undo.
- define variable newArr as Array no-undo.
+ method private void growAtEnd (required as integer):
+ define variable size as integer no-undo.
+ define variable increment as integer no-undo.
+ define variable newArr as Object no-undo extent.
- size = lastIndex - firstIndex.
- if firstIndex >= required - (array_:length() - lastIndex) then
- do:
- if size gt 0 then
- do:
- Arrays:copy(array_, firstIndex, array_, 0, size).
- Arrays:fill(array_, maximum(firstIndex, size), array_:length(), ?).
- end.
- assign
- firstIndex = 0
- lastIndex = size.
- end.
- else
- do:
- assign
- increment = maximum(12, required, integer(size / 2))
- newArr = newElementArray (size + increment).
- if size gt 0 then
- do:
- Arrays:copy(array_, firstIndex, newArr, 0, size).
+ size = lastIndex - firstIndex.
+ if firstIndex >= required - (extent(array_) - lastIndex) then
+ do:
+ if size gt 0 then
+ do:
+ Arrays:copy(array_, firstIndex, array_, 0, size).
+ Arrays:fill(array_, maximum(firstIndex, size), extent(array_), ?).
+ end.
assign
- firstIndex = 0
- lastIndex = size.
- end.
- delete object array_.
- array_ = newArr.
- end.
+ firstIndex = 0
+ lastIndex = size.
+ end.
+ else
+ do:
+ assign
+ increment = maximum(12, required, integer(size / 2))
+ extent(newArr) = size + increment.
+ if size gt 0 then
+ do:
+ Arrays:copy(array_, firstIndex, newArr, 0, size).
+ assign
+ firstIndex = 0
+ lastIndex = size.
+ end.
+ assign
+ extent(array_) = ?
+ extent(array_) = extent(newArr).
+ Arrays:copy(newArr, 0, array_, 0, extent(newArr)).
+ end.
- end method.
+ end method.
- method private void growAtFront (required as integer):
- define variable size as integer no-undo.
- define variable newFirst as integer no-undo.
- define variable increment as integer no-undo.
- define variable newArr as Array no-undo.
+ method private void growAtFront (required as integer):
+ define variable size as integer no-undo.
+ define variable newFirst as integer no-undo.
+ define variable increment as integer no-undo.
+ define variable newArr as Object no-undo extent.
- size = lastIndex - firstIndex.
- if array_:length() - size ge required then
- do:
- newFirst = array_:length() - size.
- if size gt 0 then
- do:
- Arrays:copy(array_, firstIndex, array_, newFirst, size).
- Arrays:fill(array_, firstIndex, maximum(newFirst, firstIndex + size), ?).
- end.
- assign
- firstIndex = newFirst
- lastIndex = array_:length().
- end.
- else
- do:
- assign
- increment = maximum(12, required, integer(size / 2))
- newArr = newElementArray (size + increment).
- if size gt 0 then
- Arrays:copy(array_, firstIndex, newArr, newArr:length() - size, size).
- delete object array_.
- assign
- lastIndex = newArr:length()
- firstIndex = lastIndex - size
- array_ = newArr.
- end.
- end method.
+ size = lastIndex - firstIndex.
+ if extent(array_) - size ge required then
+ do:
+ newFirst = extent(array_) - size.
+ if size gt 0 then
+ do:
+ Arrays:copy(array_, firstIndex, array_, newFirst, size).
+ Arrays:fill(array_, firstIndex, maximum(newFirst, firstIndex + size), ?).
+ end.
+ assign
+ firstIndex = newFirst
+ lastIndex = extent(array_).
+ end.
+ else
+ do:
+ assign
+ increment = maximum(12, required, integer(size / 2))
+ extent(newArr) = size + increment.
+
+ if size gt 0 then
+ Arrays:copy(array_, firstIndex, newArr, extent(newArr) - size, size).
+
+ assign
+ extent(array_) = ?
+ extent(array_) = extent(newArr)
+ lastIndex = extent(newArr)
+ firstIndex = lastIndex - size.
+
+ Arrays:copy(newArr, 0, array_, 0, extent(newArr)).
+ end.
+ end method.
- method private void growForInsert(location as integer, required as integer):
- define variable size as integer no-undo.
- define variable newFirst as integer no-undo.
- define variable increment as integer no-undo.
- define variable newArr as Array no-undo.
+ method private void growForInsert(location as integer, required as integer):
+ define variable size as integer no-undo.
+ define variable newFirst as integer no-undo.
+ define variable increment as integer no-undo.
+ define variable newArr as Object no-undo extent.
- assign
- size = lastIndex - firstIndex
- increment = maximum(12, required, integer(size / 2))
- newFirst = increment - required
- newArr = newElementArray (size + increment).
- /* Copy elements after location to the new array skipping inserted elements */
- Arrays:copy(array_, location + firstIndex, newArr,
- newFirst + location + required, size - location).
- /* Copy elements before location to the new array from firstIndex */
- Arrays:copy(array_, firstIndex, newArr,
- newFirst, location).
- delete object array_.
- assign
- firstIndex = newFirst
- lastIndex = size + increment
- array_ = newArr.
- end method.
+ assign
+ size = lastIndex - firstIndex
+ increment = maximum(12, required, integer(size / 2))
+ newFirst = increment - required
+ extent(newArr) = size + increment.
+ /* Copy elements after location to the new array skipping inserted elements */
+ Arrays:copy(array_, location + firstIndex, newArr,
+ newFirst + location + required, size - location).
+ /* Copy elements before location to the new array from firstIndex */
+ Arrays:copy(array_, firstIndex, newArr, newFirst, location).
+ assign
+ extent(array_) = ?
+ extent(array_) = extent(newArr)
+ firstIndex = newFirst
+ lastIndex = size + increment.
+
+ Arrays:copy(newArr, 0, array_, 0, extent(newArr)).
+ end method.
- method override protected void removeRange( input idxStart as integer, input idxEnd as integer ):
- define variable size as integer no-undo.
- define variable newLast as integer no-undo.
+ method override protected void removeRange( input idxStart as integer, input idxEnd as integer ):
+ define variable size as integer no-undo.
+ define variable newLast as integer no-undo.
- size = lastIndex - firstIndex.
+ size = lastIndex - firstIndex.
- if idxStart lt 0 or idxStart gt idxEnd or idxEnd ge size then
- undo, throw new IndexOutOfBoundsException().
+ if idxStart lt 0 or idxStart gt idxEnd or idxEnd ge size then
+ undo, throw new IndexOutOfBoundsException().
- if idxStart eq idxEnd then
- return.
+ if idxStart eq idxEnd then
+ return.
- if idxEnd eq size then
- do:
- Arrays:fill(array_, firstIndex + idxStart, lastIndex, ?).
- lastIndex = firstIndex + idxStart.
- end.
- else
- do:
- if idxStart eq 0 then
- do:
- Arrays:fill(array_, firstIndex, firstIndex + idxEnd, ?).
- firstIndex = firstIndex + idxEnd.
- end.
- else
- do:
- newLast = lastIndex + idxStart - idxEnd.
+ if idxEnd eq size then
+ do:
+ Arrays:fill(array_, firstIndex + idxStart, lastIndex, ?).
+ lastIndex = firstIndex + idxStart.
+ end.
+ else
+ do:
+ if idxStart eq 0 then
+ do:
+ Arrays:fill(array_, firstIndex, firstIndex + idxEnd, ?).
+ firstIndex = firstIndex + idxEnd.
+ end.
+ else
+ do:
+ newLast = lastIndex + idxStart - idxEnd.
- Arrays:copy(array_, firstIndex + idxEnd, array_, firstIndex + idxStart, size - idxEnd).
- Arrays:fill(array_, newLast, lastIndex, ?).
- lastIndex = newLast.
- end.
- end.
- modCount = modCount + 1.
+ Arrays:copy(array_, firstIndex + idxEnd, array_, firstIndex + idxStart, size - idxEnd).
+ Arrays:fill(array_, newLast, lastIndex, ?).
+ lastIndex = newLast.
+ end.
+ end.
+ modCount = modCount + 1.
- end method.
+ end method.
- method override public integer size( ):
- return lastIndex - firstIndex.
- end method.
+ method override public integer size( ):
+ return lastIndex - firstIndex.
+ end method.
- method override public Object extent toArray( ):
- define variable size as integer no-undo.
- define variable retArr as Object no-undo extent.
+ method override public Object extent toArray( ):
+ define variable size as integer no-undo.
+ define variable retArr as Object no-undo extent.
- size = lastIndex - firstIndex.
- if size gt 0 then
- do:
- extent(retArr) = size.
- Arrays:copy(array_, firstIndex, retArr, 0, size).
- end.
- return retArr.
- end method.
+ size = lastIndex - firstIndex.
+ if size gt 0 then
+ do:
+ extent(retArr) = size.
+ Arrays:copy(array_, firstIndex, retArr, 0, size).
+ end.
+ return retArr.
+ end method.
- method public void trimToSize ():
- define variable size as integer no-undo.
- define variable newArr as Array no-undo.
+ method public void trimToSize ():
+ define variable size as integer no-undo.
+ define variable newArr as Object no-undo extent.
- size = lastIndex - firstIndex.
+ size = lastIndex - firstIndex.
- if array_:length() eq size then
- return.
+ if extent(array_) eq size then
+ return.
- newArr = newElementArray (size).
- Arrays:copy(array_, firstIndex, newArr, 0, size).
- delete object array_.
- assign
- firstIndex = 0
- lastIndex = size
- modCount = 0
- array_ = newArr.
-
- end method.
+ extent(newArr) = size.
+ Arrays:copy(array_, firstIndex, newArr, 0, size).
+
+ assign
+ extent(array_) = ?
+ extent(array_) = extent(newArr)
+ firstIndex = 0
+ lastIndex = size
+ modCount = 0.
+ Arrays:copy(newArr, 0, array_, 0, size).
+ end method.
- method override public logical add (input listItem as Object ):
- if lastIndex eq array_:length() then
- growAtEnd(1).
+ method override public logical add (input listItem as Object ):
+ if lastIndex eq extent(array_) then
+ growAtEnd(1).
- if not array_:set(lastIndex, listItem) then
- return false.
- assign
- modCount = modCount + 1
+ array_[lastIndex + 1] = listItem no-error.
+ if error-status:error or error-status:num-messages gt 0 then
+ return false.
- lastIndex = lastIndex + 1.
- return true.
- end method.
+ assign
+ modCount = modCount + 1
+ lastIndex = lastIndex + 1.
+ return true.
+ end method.
- method override public logical add( input idx as integer, input listItem as Object ):
- define variable size as integer no-undo.
- define variable newIdx as integer no-undo.
+ method override public logical add( input idx as integer, input listItem as Object ):
+ define variable size as integer no-undo.
+ define variable newIdx as integer no-undo.
- size = lastIndex - firstIndex.
+ size = lastIndex - firstIndex.
- if idx lt 0 or idx gt size then
- undo, throw new IndexOutOfBoundsException().
+ if idx lt 0 or idx gt size then
+ undo, throw new IndexOutOfBoundsException().
- case idx:
- when 0 then
+ case idx:
+ when 0 then
+ do:
+ if firstIndex eq 0 then
+ growAtFront(1).
+ array_[firstIndex] = listItem no-error.
+ if error-status:error or error-status:num-messages gt 0 then
+ return false.
+ firstIndex = firstIndex - 1.
+ end.
+ when size then
+ do:
+ if lastIndex eq extent(array_) then
+ growAtEnd(1).
+ array_[lastIndex + 1] = listItem no-error.
+ if error-status:error or error-status:num-messages gt 0 then
+ return false.
+ lastIndex = lastIndex + 1.
+ end.
+ otherwise
do:
- if firstIndex eq 0 then
- growAtFront(1).
-
- if array_:set(firstIndex - 1, listItem) then
- return false.
- firstIndex = firstIndex - 1.
+ newIdx = idx + firstIndex.
+ if firstIndex eq 0 and lastIndex eq extent(array_) then
+ growForInsert(idx, 1).
+ else
+ do:
+ if (idx < size / 2 and firstIndex > 0) or lastIndex eq extent(array_) then
+ do:
+ Arrays:copy(array_, firstIndex, array_, firstIndex - 1, idx).
+ firstIndex = firstIndex - 1.
+ end.
+ else
+ do:
+ Arrays:copy(array_, newIdx, array_, newIdx + 1, size - idx).
+ lastIndex = lastIndex + 1.
+ end.
+ end.
+ array_[newIdx + 1] = listItem no-error.
+ if error-status:error or error-status:num-messages gt 0 then
+ return false.
end.
- when size then
- do:
- if lastIndex eq array_:length() then
- growAtEnd(1).
- if not array_:set(lastIndex, listItem) then
- return false.
- lastIndex = lastIndex + 1.
- end.
- otherwise
- do:
- newIdx = idx + firstIndex.
- if firstIndex eq 0 and lastIndex eq array_:length() then
- growForInsert(idx, 1).
- else
- do:
- if (idx < size / 2 and firstIndex > 0) or lastIndex eq array_:length() then
- do:
- Arrays:copy(array_, firstIndex, array_, firstIndex - 1, idx).
- firstIndex = firstIndex - 1.
- end.
- else
- do:
- Arrays:copy(array_, newIdx, array_, newIdx + 1, size - idx).
- lastIndex = lastIndex + 1.
- end.
- end.
- if not array_:set(newIdx, listItem) then
- return false.
- end.
- end case.
- modCount = modCount + 1.
- return true.
- end method.
+ end case.
+ modCount = modCount + 1.
+ return true.
+ end method.
- method override public Object set(location as integer, listItem as Object ):
- define variable retObj as Object no-undo.
+ method override public Object set(location as integer, listItem as Object ):
+ define variable retObj as Object no-undo.
- if location lt 0 or location ge lastIndex - firstIndex
- then undo, throw new IndexOutOfBoundsException().
+ if location lt 0 or location ge lastIndex - firstIndex
+ then undo, throw new IndexOutOfBoundsException().
- retObj = array_:get(firstIndex + location).
- if not array_:set(firstIndex + location, listItem) then
- undo, throw new ArrayStoreException().
- return retObj.
- end method.
+ retObj = array_[firstIndex + location + 1].
+ array_[firstIndex + location + 1] = listItem no-error.
+ if error-status:error or error-status:num-messages gt 0 then
+ undo, throw new ArrayStoreException().
+ return retObj.
+ end method.
- method override public void clear( ):
- if firstIndex eq lastIndex then
- return.
+ method override public void clear( ):
+ if firstIndex eq lastIndex then
+ return.
- Arrays:fill(array_, firstIndex, lastIndex, ?).
- assign
- firstIndex = 0
- lastIndex = 0
- modCount = modCount + 1.
- end method.
+ Arrays:fill(array_, firstIndex, lastIndex, ?).
+ assign
+ firstIndex = 0
+ lastIndex = 0
+ modCount = modCount + 1.
+ end method.
- method public void delete( ):
- define variable idx as integer no-undo.
+ method public void delete( ):
+ define variable idx as integer no-undo.
- do idx = firstIndex to lastIndex:
- delete object array_:Array[idx + 1] no-error.
- end.
- this-object:clear().
- end method.
+ do idx = firstIndex to lastIndex:
+ delete object array_[idx] no-error.
+ end.
+ this-object:clear().
+ end method.
- method override public logical remove( input listItem as Object ):
- define variable location as integer no-undo.
+ method override public logical remove( input listItem as Object ):
+ define variable location as integer no-undo.
- location = indexOf(listItem).
- if location eq -1 then
- return false.
+ location = indexOf(listItem).
+ if location eq -1 then
+ return false.
- remove(location).
- return true.
- end method.
+ remove(location).
+ return true.
+ end method.
- method override public Object remove (input location as integer ):
- define variable retObj as Object no-undo.
- define variable size as integer no-undo.
- define variable elementIndex as integer no-undo.
+ method override public Object remove (input location as integer ):
+ define variable retObj as Object no-undo.
+ define variable size as integer no-undo.
+ define variable elementIndex as integer no-undo.
- size = lastIndex - firstIndex.
+ size = lastIndex - firstIndex.
- if location lt 0 or location ge size then
- undo, throw new IndexOutOfBoundsException().
+ if location lt 0 or location ge size then
+ undo, throw new IndexOutOfBoundsException().
- case location:
- when 0 then
+ case location:
+ when 0 then
+ do:
+ assign
+ retObj = array_[firstIndex + 1]
+ array_[firstIndex + 1] = ?
+ firstIndex = firstIndex + 1.
+ end.
+ when size - 1 then
+ do:
+ assign
+ lastIndex = lastIndex - 1
+ retObj = array_[lastIndex + 1]
+ array_[lastIndex + 1] = ?.
+ end.
+ otherwise
do:
- retObj = array_:get(firstIndex).
- array_:set(firstIndex, ?).
- firstIndex = firstIndex + 1.
- end.
- when size - 1 then
- do:
- assign
- lastIndex = lastIndex - 1
- retObj = array_:get(lastIndex).
- array_:set(lastIndex, ?).
- end.
- otherwise
- do:
- assign
- elementIndex = location + firstIndex
- retObj = array_:get(elementIndex).
+ assign
+ elementIndex = location + firstIndex
+ retObj = array_[elementIndex + 1].
- if location < size / 2 then
- do:
- Arrays:copy(array_, firstIndex, array_, firstIndex + 1, location).
- array_:set(firstIndex, ?).
- firstIndex = firstIndex + 1.
+ if location < size / 2 then
+ do:
+ Arrays:copy(array_, firstIndex, array_, firstIndex + 1, location).
+ assign
+ array_[firstIndex + 1] = ?
+ firstIndex = firstIndex + 1.
+ end.
+ else
+ do:
+ Arrays:copy(array_, elementIndex + 1, array_, elementIndex, size - location - 1).
+ assign
+ lastIndex = lastIndex - 1
+ array_[lastIndex + 1] = ?.
+ end.
end.
- else
- do:
- Arrays:copy(array_, elementIndex + 1, array_, elementIndex, size - location - 1).
- lastIndex = lastIndex - 1.
- array_:set(lastIndex, ?).
- end.
- end.
- end case.
- modCount = modCount + 1.
+ end case.
+ modCount = modCount + 1.
- return retObj.
- end method.
+ return retObj.
+ end method.
- method override public Object get ( input location as integer):
+ method override public Object get ( input location as integer):
- if location lt 0 or location ge lastIndex - firstIndex then
- undo, throw new IndexOutOfBoundsException().
+ if location lt 0 or location ge lastIndex - firstIndex then
+ undo, throw new IndexOutOfBoundsException().
- return array_:get(firstIndex + location).
- end method.
+ return array_[firstIndex + location + 1].
+ end method.
end class.
\ No newline at end of file
Modified: net.sourceforge.progress.jms/src/net/sourceforge/progress/util/HashMap/Entry.cls
===================================================================
--- net.sourceforge.progress.jms/src/net/sourceforge/progress/util/HashMap/Entry.cls 2011-07-05 08:18:15 UTC (rev 90)
+++ net.sourceforge.progress.jms/src/net/sourceforge/progress/util/HashMap/Entry.cls 2011-07-05 08:20:25 UTC (rev 91)
@@ -62,9 +62,8 @@
return newEntry.
catch e as Progress.Lang.Error :
- delete object e.
delete object newEntry no-error.
- undo, throw new CloneNotSupportedException().
+ undo, throw new CloneNotSupportedException(e).
end catch.
end method.
Modified: net.sourceforge.progress.jms/src/net/sourceforge/progress/util/List/Iterator.cls
===================================================================
--- net.sourceforge.progress.jms/src/net/sourceforge/progress/util/List/Iterator.cls 2011-07-05 08:18:15 UTC (rev 90)
+++ net.sourceforge.progress.jms/src/net/sourceforge/progress/util/List/Iterator.cls 2011-07-05 08:20:25 UTC (rev 91)
@@ -69,7 +69,7 @@
numLeft = numLeft - 1.
return ret.
catch e as IndexOutOfBoundsException :
- undo, throw new NoSuchElementException().
+ undo, throw new NoSuchElementException(e).
end catch.
end.
end method.
@@ -90,7 +90,7 @@
expectedModCount = selfList:modCount
lastPosition = -1.
catch e as IndexOutOfBoundsException :
- undo, throw new ConcurrentModificationException().
+ undo, throw new ConcurrentModificationException(e).
end catch.
end.
end method.
Modified: net.sourceforge.progress.jms/src/net/sourceforge/progress/util/List/ListIterator.cls
===================================================================
--- net.sourceforge.progress.jms/src/net/sourceforge/progress/util/List/ListIterator.cls 2011-07-05 08:18:15 UTC (rev 90)
+++ net.sourceforge.progress.jms/src/net/sourceforge/progress/util/List/ListIterator.cls 2011-07-05 08:20:25 UTC (rev 91)
@@ -57,7 +57,7 @@
expectedModCount = selfList:modCount
lastPosition = -1.
catch e as IndexOutOfBoundsException :
- undo, throw new NoSuchElementException().
+ undo, throw new NoSuchElementException(e).
end catch.
end.
end method.
@@ -85,7 +85,7 @@
lastPosition = idx.
return retObject.
catch e as IndexOutOfBoundsException :
- undo, throw new NoSuchElementException().
+ undo, throw new NoSuchElementException(e).
end catch.
end.
end method.
@@ -101,7 +101,7 @@
do on error undo, leave:
selfList:set(lastPosition, listItem).
catch e as IndexOutOfBoundsException :
- undo, throw new IllegalStateException().
+ undo, throw new IllegalStateException(e).
end catch.
end.
end method.
Modified: net.sourceforge.progress.jms/src/net/sourceforge/progress/util/Map/KeySetIterator.cls
===================================================================
--- net.sourceforge.progress.jms/src/net/sourceforge/progress/util/Map/KeySetIterator.cls 2011-07-05 08:18:15 UTC (rev 90)
+++ net.sourceforge.progress.jms/src/net/sourceforge/progress/util/Map/KeySetIterator.cls 2011-07-05 08:20:25 UTC (rev 91)
@@ -56,7 +56,7 @@
do on error undo, leave:
return cast(setIterator:next(), 'Entry':u):getKey().
catch e as Progress.Lang.Error :
- undo, throw new NoSuchElementException().
+ undo, throw new NoSuchElementException(e).
end catch.
end.
end method.
Modified: net.sourceforge.progress.jms/src/net/sourceforge/progress/util/Map/ValuesIterator.cls
===================================================================
--- net.sourceforge.progress.jms/src/net/sourceforge/progress/util/Map/ValuesIterator.cls 2011-07-05 08:18:15 UTC (rev 90)
+++ net.sourceforge.progress.jms/src/net/sourceforge/progress/util/Map/ValuesIterator.cls 2011-07-05 08:20:25 UTC (rev 91)
@@ -54,7 +54,7 @@
do on error undo, leave:
return cast(setIterator:next(), 'Entry':u):getValue().
catch e as Progress.Lang.Error :
- undo, throw new NoSuchElementException().
+ undo, throw new NoSuchElementException(e).
end catch.
end.
end method.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <me...@us...> - 2011-07-05 08:18:21
|
Revision: 90
http://progress-jms.svn.sourceforge.net/progress-jms/?rev=90&view=rev
Author: medu
Date: 2011-07-05 08:18:15 +0000 (Tue, 05 Jul 2011)
Log Message:
-----------
remove size property (length method dupe)
Modified Paths:
--------------
net.sourceforge.progress.jms/src/net/sourceforge/progress/lang/Array/Array.i
Modified: net.sourceforge.progress.jms/src/net/sourceforge/progress/lang/Array/Array.i
===================================================================
--- net.sourceforge.progress.jms/src/net/sourceforge/progress/lang/Array/Array.i 2011-07-05 08:16:12 UTC (rev 89)
+++ net.sourceforge.progress.jms/src/net/sourceforge/progress/lang/Array/Array.i 2011-07-05 08:18:15 UTC (rev 90)
@@ -32,10 +32,6 @@
get.
set.
- define public property size as integer no-undo
- get:
- return extent(Array).
- end get.
/* *************************** Main Block *************************** */
@@ -51,13 +47,13 @@
end constructor.
method public {2} get (arrIndex as integer):
- if arrIndex eq ? or arrIndex lt 0 or arrIndex ge size then
+ if arrIndex eq ? or arrIndex lt 0 or arrIndex ge length () then
undo, throw new IndexOutOfBoundsException().
return Array[arrIndex + 1].
end method.
method public logical set (arrIndex as integer, arrElement as {2}):
- if arrIndex eq ? or arrIndex lt 0 or arrIndex ge size then
+ if arrIndex eq ? or arrIndex lt 0 or arrIndex ge length () then
undo, throw new IndexOutOfBoundsException().
Array[arrIndex + 1] = arrElement no-error.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <me...@us...> - 2011-07-05 08:16:18
|
Revision: 89
http://progress-jms.svn.sourceforge.net/progress-jms/?rev=89&view=rev
Author: medu
Date: 2011-07-05 08:16:12 +0000 (Tue, 05 Jul 2011)
Log Message:
-----------
exception chain
Modified Paths:
--------------
net.sourceforge.progress.jms/src/net/sourceforge/progress/lang/BitWise.cls
net.sourceforge.progress.jms/src/net/sourceforge/progress/lang/Integer.cls
net.sourceforge.progress.jms/src/net/sourceforge/progress/lang/Long.cls
net.sourceforge.progress.jms/src/net/sourceforge/progress/lang/Primitives.cls
net.sourceforge.progress.jms/src/net/sourceforge/progress/lang/StringBuffer.cls
Modified: net.sourceforge.progress.jms/src/net/sourceforge/progress/lang/BitWise.cls
===================================================================
--- net.sourceforge.progress.jms/src/net/sourceforge/progress/lang/BitWise.cls 2011-07-05 08:11:35 UTC (rev 88)
+++ net.sourceforge.progress.jms/src/net/sourceforge/progress/lang/BitWise.cls 2011-07-05 08:16:12 UTC (rev 89)
@@ -53,8 +53,7 @@
return BitWise:and(i1:intValue(), i2:intValue()).
catch e as Progress.Lang.Error :
- delete object e.
- undo, throw new NullPointerException().
+ undo, throw new NullPointerException(e).
end catch.
end method.
@@ -73,8 +72,7 @@
return BitWise:not(i:intValue()).
catch e as Progress.Lang.Error :
- delete object e.
- undo, throw new NullPointerException().
+ undo, throw new NullPointerException(e).
end catch.
end method.
@@ -98,8 +96,7 @@
return BitWise:or(i1:intValue(), i2:intValue()).
catch e as Progress.Lang.Error :
- delete object e.
- undo, throw new NullPointerException().
+ undo, throw new NullPointerException(e).
end catch.
end method.
@@ -134,8 +131,7 @@
return BitWise:shiftLeft(i:intValue(), offset).
catch e as Progress.Lang.Error :
- delete object e.
- undo, throw new NullPointerException().
+ undo, throw new NullPointerException(e).
end catch.
end method.
@@ -143,8 +139,7 @@
return BitWise:shiftLeft(i:intValue(), offset:intValue()).
catch e as Progress.Lang.Error :
- delete object e.
- undo, throw new NullPointerException().
+ undo, throw new NullPointerException(e).
end catch.
end method.
@@ -175,8 +170,7 @@
return BitWise:shiftRight(i:intValue(), offset).
catch e as Progress.Lang.Error :
- delete object e.
- undo, throw new NullPointerException().
+ undo, throw new NullPointerException(e).
end catch.
end method.
@@ -184,8 +178,7 @@
return BitWise:shiftRight(i:intValue(), offset:intValue()).
catch e as Progress.Lang.Error :
- delete object e.
- undo, throw new NullPointerException().
+ undo, throw new NullPointerException(e).
end catch.
end method.
@@ -203,8 +196,7 @@
return BitWise:shiftRightLogical(i:intValue(), offset).
catch e as Progress.Lang.Error :
- delete object e.
- undo, throw new NullPointerException().
+ undo, throw new NullPointerException(e).
end catch.
end method.
@@ -212,8 +204,7 @@
return BitWise:shiftRightLogical(i:intValue(), offset:intValue()).
catch e as Progress.Lang.Error :
- delete object e.
- undo, throw new NullPointerException().
+ undo, throw new NullPointerException(e).
end catch.
end method.
@@ -236,8 +227,7 @@
return BitWise:xor(i1:intValue(), i2:intValue()).
catch e as Progress.Lang.Error :
- delete object e.
- undo, throw new NullPointerException().
+ undo, throw new NullPointerException(e).
end catch.
end method.
Modified: net.sourceforge.progress.jms/src/net/sourceforge/progress/lang/Integer.cls
===================================================================
--- net.sourceforge.progress.jms/src/net/sourceforge/progress/lang/Integer.cls 2011-07-05 08:11:35 UTC (rev 88)
+++ net.sourceforge.progress.jms/src/net/sourceforge/progress/lang/Integer.cls 2011-07-05 08:16:12 UTC (rev 89)
@@ -150,8 +150,7 @@
return result.
catch e as Progress.Lang.Error:
- delete object e.
- undo, throw new NumberFormatException().
+ undo, throw new NumberFormatException(e).
end catch.
end method.
Modified: net.sourceforge.progress.jms/src/net/sourceforge/progress/lang/Long.cls
===================================================================
--- net.sourceforge.progress.jms/src/net/sourceforge/progress/lang/Long.cls 2011-07-05 08:11:35 UTC (rev 88)
+++ net.sourceforge.progress.jms/src/net/sourceforge/progress/lang/Long.cls 2011-07-05 08:16:12 UTC (rev 89)
@@ -52,8 +52,7 @@
internNumber = int64(val).
catch e as Progress.Lang.Error :
- delete object e.
- undo, throw new NumberFormatException ('The string does not contain a parsable number.':u).
+ undo, throw new NumberFormatException ('The string does not contain a parsable number.':u, e).
end catch.
end constructor.
@@ -61,8 +60,7 @@
internNumber = int64(val).
catch e as Progress.Lang.Error :
- delete object e.
- undo, throw new NumberFormatException ('The string does not contain a parsable number.':u).
+ undo, throw new NumberFormatException ('The string does not contain a parsable number.':u, e).
end catch.
end constructor.
Modified: net.sourceforge.progress.jms/src/net/sourceforge/progress/lang/Primitives.cls
===================================================================
--- net.sourceforge.progress.jms/src/net/sourceforge/progress/lang/Primitives.cls 2011-07-05 08:11:35 UTC (rev 88)
+++ net.sourceforge.progress.jms/src/net/sourceforge/progress/lang/Primitives.cls 2011-07-05 08:16:12 UTC (rev 89)
@@ -35,8 +35,7 @@
return string(val).
catch e as Progress.Lang.Error :
- delete object e.
- undo, throw new DataTypeStoreException().
+ undo, throw new DataTypeStoreException(e).
end catch.
end method.
@@ -44,8 +43,7 @@
return string(val).
catch e as Progress.Lang.Error :
- delete object e.
- undo, throw new DataTypeStoreException().
+ undo, throw new DataTypeStoreException(e).
end catch.
end method.
@@ -53,8 +51,7 @@
return string(val).
catch e as Progress.Lang.Error :
- delete object e.
- undo, throw new DataTypeStoreException().
+ undo, throw new DataTypeStoreException(e).
end catch.
end method.
@@ -62,8 +59,7 @@
return string(val).
catch e as Progress.Lang.Error :
- delete object e.
- undo, throw new DataTypeStoreException().
+ undo, throw new DataTypeStoreException(e).
end catch.
end method.
@@ -71,8 +67,7 @@
return string(val).
catch e as Progress.Lang.Error :
- delete object e.
- undo, throw new DataTypeStoreException().
+ undo, throw new DataTypeStoreException(e).
end catch.
end method.
@@ -80,8 +75,7 @@
return string(val).
catch e as Progress.Lang.Error :
- delete object e.
- undo, throw new DataTypeStoreException().
+ undo, throw new DataTypeStoreException(e).
end catch.
end method.
@@ -89,8 +83,7 @@
return string(val).
catch e as Progress.Lang.Error :
- delete object e.
- undo, throw new DataTypeStoreException().
+ undo, throw new DataTypeStoreException(e).
end catch.
end method.
@@ -98,8 +91,7 @@
return get-string(val, 1, -1).
catch e as Progress.Lang.Error :
- delete object e.
- undo, throw new DataTypeStoreException().
+ undo, throw new DataTypeStoreException(e).
end catch.
end method.
@@ -107,8 +99,7 @@
return get-long(val, 1).
catch e as Progress.Lang.Error :
- delete object e.
- undo, throw new NumberFormatException().
+ undo, throw new NumberFormatException(e).
end catch.
end method.
@@ -116,8 +107,7 @@
return integer(val).
catch e as Progress.Lang.Error :
- delete object e.
- undo, throw new DataTypeStoreException().
+ undo, throw new DataTypeStoreException(e).
end catch.
end method.
@@ -125,8 +115,7 @@
return integer(val).
catch e as Progress.Lang.Error :
- delete object e.
- undo, throw new NumberFormatException().
+ undo, throw new NumberFormatException(e).
end catch.
end method.
@@ -134,8 +123,7 @@
return integer(val).
catch e as Progress.Lang.Error :
- delete object e.
- undo, throw new NumberFormatException().
+ undo, throw new NumberFormatException(e).
end catch.
end method.
@@ -143,8 +131,7 @@
return get-int64(val, 1).
catch e as Progress.Lang.Error :
- delete object e.
- undo, throw new NumberFormatException().
+ undo, throw new NumberFormatException(e).
end catch.
end method.
@@ -152,8 +139,7 @@
return int64(val).
catch e as Progress.Lang.Error :
- delete object e.
- undo, throw new NumberFormatException().
+ undo, throw new NumberFormatException(e).
end catch.
end method.
@@ -161,8 +147,7 @@
return int64(val).
catch e as Progress.Lang.Error :
- delete object e.
- undo, throw new NumberFormatException().
+ undo, throw new NumberFormatException(e).
end catch.
end method.
@@ -170,8 +155,7 @@
return get-double(val, 1).
catch e as Progress.Lang.Error :
- delete object e.
- undo, throw new NumberFormatException().
+ undo, throw new NumberFormatException(e).
end catch.
end method.
@@ -179,8 +163,7 @@
return decimal(val).
catch e as Progress.Lang.Error :
- delete object e.
- undo, throw new NumberFormatException().
+ undo, throw new NumberFormatException(e).
end catch.
end method.
@@ -188,8 +171,7 @@
return decimal(val).
catch e as Progress.Lang.Error :
- delete object e.
- undo, throw new NumberFormatException().
+ undo, throw new NumberFormatException(e).
end catch.
end method.
Modified: net.sourceforge.progress.jms/src/net/sourceforge/progress/lang/StringBuffer.cls
===================================================================
--- net.sourceforge.progress.jms/src/net/sourceforge/progress/lang/StringBuffer.cls 2011-07-05 08:11:35 UTC (rev 88)
+++ net.sourceforge.progress.jms/src/net/sourceforge/progress/lang/StringBuffer.cls 2011-07-05 08:16:12 UTC (rev 89)
@@ -86,6 +86,9 @@
method override public character toString( ):
return string(charString).
+ catch e as Progress.Lang.Error :
+ return ?.
+ end catch.
end method.
end class.
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <me...@us...> - 2011-07-05 08:11:42
|
Revision: 88
http://progress-jms.svn.sourceforge.net/progress-jms/?rev=88&view=rev
Author: medu
Date: 2011-07-05 08:11:35 +0000 (Tue, 05 Jul 2011)
Log Message:
-----------
exception base object
Modified Paths:
--------------
net.sourceforge.progress.jms/src/net/sourceforge/progress/lang/ArrayIndexOutOfBoundsException.cls
net.sourceforge.progress.jms/src/net/sourceforge/progress/lang/ArrayStoreException.cls
net.sourceforge.progress.jms/src/net/sourceforge/progress/lang/ClassCastException.cls
net.sourceforge.progress.jms/src/net/sourceforge/progress/lang/CloneNotSupportedException.cls
net.sourceforge.progress.jms/src/net/sourceforge/progress/lang/ConcurrentModificationException.cls
net.sourceforge.progress.jms/src/net/sourceforge/progress/lang/DataTypeStoreException.cls
net.sourceforge.progress.jms/src/net/sourceforge/progress/lang/IllegalArgumentException.cls
net.sourceforge.progress.jms/src/net/sourceforge/progress/lang/IllegalStateException.cls
net.sourceforge.progress.jms/src/net/sourceforge/progress/lang/IndexOutOfBoundsException.cls
net.sourceforge.progress.jms/src/net/sourceforge/progress/lang/NoSuchElementException.cls
net.sourceforge.progress.jms/src/net/sourceforge/progress/lang/NullPointerException.cls
net.sourceforge.progress.jms/src/net/sourceforge/progress/lang/NumberFormatException.cls
net.sourceforge.progress.jms/src/net/sourceforge/progress/lang/RuntimeException.cls
net.sourceforge.progress.jms/src/net/sourceforge/progress/lang/UnsupportedOperationException.cls
Added Paths:
-----------
net.sourceforge.progress.jms/src/net/sourceforge/progress/lang/Exception.cls
Modified: net.sourceforge.progress.jms/src/net/sourceforge/progress/lang/ArrayIndexOutOfBoundsException.cls
===================================================================
--- net.sourceforge.progress.jms/src/net/sourceforge/progress/lang/ArrayIndexOutOfBoundsException.cls 2010-12-03 10:38:39 UTC (rev 87)
+++ net.sourceforge.progress.jms/src/net/sourceforge/progress/lang/ArrayIndexOutOfBoundsException.cls 2011-07-05 08:11:35 UTC (rev 88)
@@ -23,15 +23,25 @@
----------------------------------------------------------------------*/
-using Progress.Lang.AppError.
+using net.sourceforge.progress.lang.Exception.
class net.sourceforge.progress.lang.ArrayIndexOutOfBoundsException
- inherits AppError:
+ inherits Exception:
- constructor public ArrayIndexOutOfBoundsException():
- end constructor.
-
- constructor public ArrayIndexOutOfBoundsException ( reason as character ):
- ReturnValue = reason.
- end constructor.
+ constructor public ArrayIndexOutOfBoundsException ( ):
+ super ().
+ end constructor.
+
+ constructor public ArrayIndexOutOfBoundsException ( input errMsg as character ):
+ super (input errMsg).
+ end constructor.
+
+ constructor public ArrayIndexOutOfBoundsException ( input errMsg as character, input cause as Progress.Lang.Error ):
+ super (input errMsg, input cause).
+ end constructor.
+
+ constructor public ArrayIndexOutOfBoundsException ( input cause as Progress.Lang.Error ):
+ super (input cause).
+ end constructor.
+
end class.
\ No newline at end of file
Modified: net.sourceforge.progress.jms/src/net/sourceforge/progress/lang/ArrayStoreException.cls
===================================================================
--- net.sourceforge.progress.jms/src/net/sourceforge/progress/lang/ArrayStoreException.cls 2010-12-03 10:38:39 UTC (rev 87)
+++ net.sourceforge.progress.jms/src/net/sourceforge/progress/lang/ArrayStoreException.cls 2011-07-05 08:11:35 UTC (rev 88)
@@ -23,15 +23,25 @@
----------------------------------------------------------------------*/
-using Progress.Lang.AppError.
+using net.sourceforge.progress.lang.Exception.
class net.sourceforge.progress.lang.ArrayStoreException
- inherits AppError:
+ inherits Exception:
- constructor public ArrayStoreException():
- end constructor.
-
- constructor public ArrayStoreException ( reason as character ):
- ReturnValue = reason.
- end constructor.
+ constructor public ArrayStoreException ( ):
+ super ().
+ end constructor.
+
+ constructor public ArrayStoreException ( input errMsg as character ):
+ super (input errMsg).
+ end constructor.
+
+ constructor public ArrayStoreException ( input errMsg as character, input cause as Progress.Lang.Error ):
+ super (input errMsg, input cause).
+ end constructor.
+
+ constructor public ArrayStoreException ( input cause as Progress.Lang.Error ):
+ super (input cause).
+ end constructor.
+
end class.
\ No newline at end of file
Modified: net.sourceforge.progress.jms/src/net/sourceforge/progress/lang/ClassCastException.cls
===================================================================
--- net.sourceforge.progress.jms/src/net/sourceforge/progress/lang/ClassCastException.cls 2010-12-03 10:38:39 UTC (rev 87)
+++ net.sourceforge.progress.jms/src/net/sourceforge/progress/lang/ClassCastException.cls 2011-07-05 08:11:35 UTC (rev 88)
@@ -23,15 +23,26 @@
----------------------------------------------------------------------*/
-using Progress.Lang.AppError.
+using net.sourceforge.progress.lang.Exception.
class net.sourceforge.progress.lang.ClassCastException
- inherits AppError:
+ inherits Exception:
- constructor public ClassCastException():
- end constructor.
-
- constructor public ClassCastException ( reason as character ):
- ReturnValue = reason.
- end constructor.
+
+ constructor public ClassCastException ( ):
+ super ().
+ end constructor.
+
+ constructor public ClassCastException ( input errMsg as character ):
+ super (input errMsg).
+ end constructor.
+
+ constructor public ClassCastException ( input errMsg as character, input cause as Progress.Lang.Error ):
+ super (input errMsg, input cause).
+ end constructor.
+
+ constructor public ClassCastException ( input cause as Progress.Lang.Error ):
+ super (input cause).
+ end constructor.
+
end class.
\ No newline at end of file
Modified: net.sourceforge.progress.jms/src/net/sourceforge/progress/lang/CloneNotSupportedException.cls
===================================================================
--- net.sourceforge.progress.jms/src/net/sourceforge/progress/lang/CloneNotSupportedException.cls 2010-12-03 10:38:39 UTC (rev 87)
+++ net.sourceforge.progress.jms/src/net/sourceforge/progress/lang/CloneNotSupportedException.cls 2011-07-05 08:11:35 UTC (rev 88)
@@ -23,15 +23,25 @@
----------------------------------------------------------------------*/
-using Progress.Lang.AppError.
+using net.sourceforge.progress.lang.Exception.
class net.sourceforge.progress.lang.CloneNotSupportedException
- inherits AppError:
+ inherits Exception:
+
+ constructor public CloneNotSupportedException ( ):
+ super ().
+ end constructor.
- constructor public CloneNotSupportedException ():
- end constructor.
-
- constructor public CloneNotSupportedException ( reason as character ):
- ReturnValue = reason.
- end constructor.
+ constructor public CloneNotSupportedException ( input errMsg as character ):
+ super (input errMsg).
+ end constructor.
+
+ constructor public CloneNotSupportedException ( input errMsg as character, input cause as Progress.Lang.Error ):
+ super (input errMsg, input cause).
+ end constructor.
+
+ constructor public CloneNotSupportedException ( input cause as Progress.Lang.Error ):
+ super (input cause).
+ end constructor.
+
end class.
\ No newline at end of file
Modified: net.sourceforge.progress.jms/src/net/sourceforge/progress/lang/ConcurrentModificationException.cls
===================================================================
--- net.sourceforge.progress.jms/src/net/sourceforge/progress/lang/ConcurrentModificationException.cls 2010-12-03 10:38:39 UTC (rev 87)
+++ net.sourceforge.progress.jms/src/net/sourceforge/progress/lang/ConcurrentModificationException.cls 2011-07-05 08:11:35 UTC (rev 88)
@@ -23,15 +23,25 @@
----------------------------------------------------------------------*/
-using Progress.Lang.AppError.
+using net.sourceforge.progress.lang.Exception.
class net.sourceforge.progress.lang.ConcurrentModificationException
- inherits AppError:
+ inherits Exception:
- constructor public ConcurrentModificationException():
- end constructor.
-
- constructor public ConcurrentModificationException ( reason as character ):
- ReturnValue = reason.
- end constructor.
+ constructor public ConcurrentModificationException ( ):
+ super ().
+ end constructor.
+
+ constructor public ConcurrentModificationException ( input errMsg as character ):
+ super (input errMsg).
+ end constructor.
+
+ constructor public ConcurrentModificationException ( input errMsg as character, input cause as Progress.Lang.Error ):
+ super (input errMsg, input cause).
+ end constructor.
+
+ constructor public ConcurrentModificationException ( input cause as Progress.Lang.Error ):
+ super (input cause).
+ end constructor.
+
end class.
\ No newline at end of file
Modified: net.sourceforge.progress.jms/src/net/sourceforge/progress/lang/DataTypeStoreException.cls
===================================================================
--- net.sourceforge.progress.jms/src/net/sourceforge/progress/lang/DataTypeStoreException.cls 2010-12-03 10:38:39 UTC (rev 87)
+++ net.sourceforge.progress.jms/src/net/sourceforge/progress/lang/DataTypeStoreException.cls 2011-07-05 08:11:35 UTC (rev 88)
@@ -23,15 +23,25 @@
----------------------------------------------------------------------*/
-using Progress.Lang.AppError.
+using net.sourceforge.progress.lang.Exception.
class net.sourceforge.progress.lang.DataTypeStoreException
- inherits AppError:
+ inherits Exception:
+
+ constructor public DataTypeStoreException ( ):
+ super ().
+ end constructor.
- constructor public DataTypeStoreException():
- end constructor.
-
- constructor public DataTypeStoreException ( reason as character ):
- ReturnValue = reason.
- end constructor.
+ constructor public DataTypeStoreException ( input errMsg as character ):
+ super (input errMsg).
+ end constructor.
+
+ constructor public DataTypeStoreException ( input errMsg as character, input cause as Progress.Lang.Error ):
+ super (input errMsg, input cause).
+ end constructor.
+
+ constructor public DataTypeStoreException ( input cause as Progress.Lang.Error ):
+ super (input cause).
+ end constructor.
+
end class.
\ No newline at end of file
Added: net.sourceforge.progress.jms/src/net/sourceforge/progress/lang/Exception.cls
===================================================================
--- net.sourceforge.progress.jms/src/net/sourceforge/progress/lang/Exception.cls (rev 0)
+++ net.sourceforge.progress.jms/src/net/sourceforge/progress/lang/Exception.cls 2011-07-05 08:11:35 UTC (rev 88)
@@ -0,0 +1,120 @@
+/*------------------------------------------------------------------------
+ File : Exception
+ Purpose :
+ Syntax :
+ Description : The class Exception and its subclasses are a form of error
+ that indicates conditions that a reasonable application
+ might want to catch.
+ Author(s) : Marian Edu
+ Created : Thu Apr 21 12:28:36 EEST 2011
+ Notes :
+
+ Email : mar...@gm...
+ Website : www.ganimede.ro
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the Lesser GNU 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 program 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
+ Lesser GNU General Public License for more details.
+ You should have received a copy of the Lesser GNU General Public License
+ along with this program. If not, see < http://www.gnu.org/licenses/>.
+
+ ----------------------------------------------------------------------*/
+
+using Progress.Lang.*.
+using net.sourceforge.progress.lang.Exception.
+
+class net.sourceforge.progress.lang.Exception inherits AppError :
+
+ define protected property cause as Error no-undo
+ get.
+ set.
+
+ constructor public Exception ( ):
+ super ().
+ end constructor.
+
+ constructor public Exception ( input errMsg as character ):
+ super (input errMsg, input 0).
+ end constructor.
+
+ constructor public Exception ( input errMsg as character, input cause as Error):
+ super (input errMsg, input 0).
+ this-object:cause = cause.
+ end constructor.
+
+ constructor public Exception ( input cause as Error ):
+ this-object:cause = cause.
+ end constructor.
+
+ destructor public Exception ( ):
+ if valid-object(cause) then
+ delete object cause.
+ end destructor.
+
+ method override public void AddMessage( input p0 as character, input p1 as integer ):
+ /* not used */
+ end method.
+
+ method public Error getCause ():
+ return cause.
+ end method.
+
+ method public character getMessage( ):
+ if numMessages gt 0 then
+ return super:getMessage(1).
+ return returnValue.
+ end method.
+
+ method override public character GetMessage( input p0 as integer ):
+ return getMessage().
+ end method.
+
+ method public void printStackTrace ():
+ Exception:printStackTrace(this-object).
+ end method.
+
+ method override public void RemoveMessage( input p0 as integer ):
+ /* not used */
+ end method.
+
+ method override public character toString( ):
+ return Exception:toString(this-object).
+ end method.
+
+ method private static character getMessage (err as Error):
+ if err:numMessages gt 0 then
+ return err:getMessage(1).
+ if type-of(err, 'AppError':u) then
+ return cast(err, 'AppError':u):returnValue.
+ return '':u.
+ end method.
+
+ method private static character toString (err as Error):
+ return substitute('&1: &2':u, err:getClass():typeName, getMessage(err)).
+ end method.
+
+ method private static void printStackTrace (err as Error):
+ define variable cause as Error no-undo.
+
+ if not valid-object(err) then
+ return.
+
+ put unformatted Exception:toString(err) skip.
+ if err:callStack ne ? then
+ put unformatted '~t':u err:callStack skip.
+
+ if type-of(err, 'Exception':u) then do:
+ cause = cast(err, 'Exception':u):getCause().
+ if valid-object(cause) then do:
+ put unformatted '~tCaused by: '.
+ Exception:printStackTrace(cause).
+ end.
+ end.
+ end method.
+
+end class.
\ No newline at end of file
Modified: net.sourceforge.progress.jms/src/net/sourceforge/progress/lang/IllegalArgumentException.cls
===================================================================
--- net.sourceforge.progress.jms/src/net/sourceforge/progress/lang/IllegalArgumentException.cls 2010-12-03 10:38:39 UTC (rev 87)
+++ net.sourceforge.progress.jms/src/net/sourceforge/progress/lang/IllegalArgumentException.cls 2011-07-05 08:11:35 UTC (rev 88)
@@ -23,15 +23,25 @@
----------------------------------------------------------------------*/
-using Progress.Lang.AppError.
+using net.sourceforge.progress.lang.Exception.
class net.sourceforge.progress.lang.IllegalArgumentException
- inherits AppError:
+ inherits Exception:
- constructor public IllegalArgumentException():
- end constructor.
-
- constructor public IllegalArgumentException ( reason as character ):
- ReturnValue = reason.
- end constructor.
+ constructor public IllegalArgumentException ( ):
+ super ().
+ end constructor.
+
+ constructor public IllegalArgumentException ( input errMsg as character ):
+ super (input errMsg).
+ end constructor.
+
+ constructor public IllegalArgumentException ( input errMsg as character, input cause as Progress.Lang.Error ):
+ super (input errMsg, input cause).
+ end constructor.
+
+ constructor public IllegalArgumentException ( input cause as Progress.Lang.Error ):
+ super (input cause).
+ end constructor.
+
end class.
\ No newline at end of file
Modified: net.sourceforge.progress.jms/src/net/sourceforge/progress/lang/IllegalStateException.cls
===================================================================
--- net.sourceforge.progress.jms/src/net/sourceforge/progress/lang/IllegalStateException.cls 2010-12-03 10:38:39 UTC (rev 87)
+++ net.sourceforge.progress.jms/src/net/sourceforge/progress/lang/IllegalStateException.cls 2011-07-05 08:11:35 UTC (rev 88)
@@ -1,37 +1,47 @@
- /*------------------------------------------------------------------------
- File : IllegalStateException
- Purpose :
- Syntax :
- Description :
- Author(s) : marian
- Created : Thu Jan 07 21:44:31 EET 2010
- Notes :
+/*------------------------------------------------------------------------
+ File : IllegalStateException
+ Purpose :
+ Syntax :
+ Description :
+ Author(s) : marian
+ Created : Thu Jan 07 21:44:31 EET 2010
+ Notes :
- Email : mar...@gm...
- Website : www.ganimede.ro
+ Email : mar...@gm...
+ Website : www.ganimede.ro
- This program is free software: you can redistribute it and/or modify
- it under the terms of the Lesser GNU 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 program 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
- Lesser GNU General Public License for more details.
- You should have received a copy of the Lesser GNU General Public License
- along with this program. If not, see < http://www.gnu.org/licenses/>.
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the Lesser GNU 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 program 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
+ Lesser GNU General Public License for more details.
+ You should have received a copy of the Lesser GNU General Public License
+ along with this program. If not, see < http://www.gnu.org/licenses/>.
- ----------------------------------------------------------------------*/
+ ----------------------------------------------------------------------*/
-using Progress.Lang.AppError.
+using net.sourceforge.progress.lang.Exception.
class net.sourceforge.progress.lang.IllegalStateException
- inherits AppError:
+ inherits Exception:
- constructor public IllegalStateException():
- end constructor.
-
- constructor public IllegalStateException ( reason as character ):
- ReturnValue = reason.
- end constructor.
+ constructor public IllegalStateException ( ):
+ super ().
+ end constructor.
+
+ constructor public IllegalStateException ( input errMsg as character ):
+ super (input errMsg).
+ end constructor.
+
+ constructor public IllegalStateException ( input errMsg as character, input cause as Progress.Lang.Error ):
+ super (input errMsg, input cause).
+ end constructor.
+
+ constructor public IllegalStateException ( input cause as Progress.Lang.Error ):
+ super (input cause).
+ end constructor.
+
end class.
\ No newline at end of file
Modified: net.sourceforge.progress.jms/src/net/sourceforge/progress/lang/IndexOutOfBoundsException.cls
===================================================================
--- net.sourceforge.progress.jms/src/net/sourceforge/progress/lang/IndexOutOfBoundsException.cls 2010-12-03 10:38:39 UTC (rev 87)
+++ net.sourceforge.progress.jms/src/net/sourceforge/progress/lang/IndexOutOfBoundsException.cls 2011-07-05 08:11:35 UTC (rev 88)
@@ -23,15 +23,25 @@
----------------------------------------------------------------------*/
-using Progress.Lang.AppError.
+using net.sourceforge.progress.lang.Exception.
class net.sourceforge.progress.lang.IndexOutOfBoundsException
- inherits AppError :
+ inherits Exception :
- constructor public IndexOutOfBoundsException():
- end constructor.
-
- constructor public IndexOutOfBoundsException ( reason as character ):
- ReturnValue = reason.
- end constructor.
+ constructor public IndexOutOfBoundsException ( ):
+ super ().
+ end constructor.
+
+ constructor public IndexOutOfBoundsException ( input errMsg as character ):
+ super (input errMsg).
+ end constructor.
+
+ constructor public IndexOutOfBoundsException ( input errMsg as character, input cause as Progress.Lang.Error ):
+ super (input errMsg, input cause).
+ end constructor.
+
+ constructor public IndexOutOfBoundsException ( input cause as Progress.Lang.Error ):
+ super (input cause).
+ end constructor.
+
end class.
\ No newline at end of file
Modified: net.sourceforge.progress.jms/src/net/sourceforge/progress/lang/NoSuchElementException.cls
===================================================================
--- net.sourceforge.progress.jms/src/net/sourceforge/progress/lang/NoSuchElementException.cls 2010-12-03 10:38:39 UTC (rev 87)
+++ net.sourceforge.progress.jms/src/net/sourceforge/progress/lang/NoSuchElementException.cls 2011-07-05 08:11:35 UTC (rev 88)
@@ -23,15 +23,25 @@
----------------------------------------------------------------------*/
-using Progress.Lang.AppError.
+using net.sourceforge.progress.lang.Exception.
class net.sourceforge.progress.lang.NoSuchElementException
- inherits AppError:
+ inherits Exception:
- constructor public NoSuchElementException():
- end constructor.
-
- constructor public NoSuchElementException ( reason as character ):
- ReturnValue = reason.
- end constructor.
+ constructor public NoSuchElementException ( ):
+ super ().
+ end constructor.
+
+ constructor public NoSuchElementException ( input errMsg as character ):
+ super (input errMsg).
+ end constructor.
+
+ constructor public NoSuchElementException ( input errMsg as character, input cause as Progress.Lang.Error ):
+ super (input errMsg, input cause).
+ end constructor.
+
+ constructor public NoSuchElementException ( input cause as Progress.Lang.Error ):
+ super (input cause).
+ end constructor.
+
end class.
\ No newline at end of file
Modified: net.sourceforge.progress.jms/src/net/sourceforge/progress/lang/NullPointerException.cls
===================================================================
--- net.sourceforge.progress.jms/src/net/sourceforge/progress/lang/NullPointerException.cls 2010-12-03 10:38:39 UTC (rev 87)
+++ net.sourceforge.progress.jms/src/net/sourceforge/progress/lang/NullPointerException.cls 2011-07-05 08:11:35 UTC (rev 88)
@@ -23,15 +23,25 @@
----------------------------------------------------------------------*/
-using Progress.Lang.AppError.
+using net.sourceforge.progress.lang.Exception.
class net.sourceforge.progress.lang.NullPointerException
- inherits AppError:
+ inherits Exception:
+
+ constructor public NullPointerException ( ):
+ super ().
+ end constructor.
- constructor public NullPointerException():
- end constructor.
-
- constructor public NullPointerException ( reason as character ):
- ReturnValue = reason.
- end constructor.
+ constructor public NullPointerException ( input errMsg as character ):
+ super (input errMsg).
+ end constructor.
+
+ constructor public NullPointerException ( input errMsg as character, input cause as Progress.Lang.Error ):
+ super (input errMsg, input cause).
+ end constructor.
+
+ constructor public NullPointerException ( input cause as Progress.Lang.Error ):
+ super (input cause).
+ end constructor.
+
end class.
\ No newline at end of file
Modified: net.sourceforge.progress.jms/src/net/sourceforge/progress/lang/NumberFormatException.cls
===================================================================
--- net.sourceforge.progress.jms/src/net/sourceforge/progress/lang/NumberFormatException.cls 2010-12-03 10:38:39 UTC (rev 87)
+++ net.sourceforge.progress.jms/src/net/sourceforge/progress/lang/NumberFormatException.cls 2011-07-05 08:11:35 UTC (rev 88)
@@ -23,15 +23,25 @@
----------------------------------------------------------------------*/
-using Progress.Lang.AppError.
+using net.sourceforge.progress.lang.Exception.
class net.sourceforge.progress.lang.NumberFormatException
- inherits AppError :
+ inherits Exception :
- constructor public NumberFormatException():
- end constructor.
-
- constructor public NumberFormatException ( reason as character ):
- ReturnValue = reason.
- end constructor.
+ constructor public NumberFormatException ( ):
+ super ().
+ end constructor.
+
+ constructor public NumberFormatException ( input errMsg as character ):
+ super (input errMsg).
+ end constructor.
+
+ constructor public NumberFormatException ( input errMsg as character, input cause as Progress.Lang.Error ):
+ super (input errMsg, input cause).
+ end constructor.
+
+ constructor public NumberFormatException ( input cause as Progress.Lang.Error ):
+ super (input cause).
+ end constructor.
+
end class.
\ No newline at end of file
Modified: net.sourceforge.progress.jms/src/net/sourceforge/progress/lang/RuntimeException.cls
===================================================================
--- net.sourceforge.progress.jms/src/net/sourceforge/progress/lang/RuntimeException.cls 2010-12-03 10:38:39 UTC (rev 87)
+++ net.sourceforge.progress.jms/src/net/sourceforge/progress/lang/RuntimeException.cls 2011-07-05 08:11:35 UTC (rev 88)
@@ -23,16 +23,26 @@
----------------------------------------------------------------------*/
-using Progress.Lang.AppError.
+using net.sourceforge.progress.lang.Exception.
class net.sourceforge.progress.lang.RuntimeException
- inherits AppError:
+ inherits Exception:
+
+ constructor public RuntimeException ( ):
+ super ().
+ end constructor.
+
+ constructor public RuntimeException ( input errMsg as character ):
+ super (input errMsg).
+ end constructor.
+
+ constructor public RuntimeException ( input errMsg as character, input cause as Progress.Lang.Error ):
+ super (input errMsg, input cause).
+ end constructor.
+
+ constructor public RuntimeException ( input cause as Progress.Lang.Error ):
+ super (input cause).
+ end constructor.
- constructor public RuntimeException():
- end constructor.
-
- constructor public RuntimeException ( reason as character ):
- ReturnValue = reason.
- end constructor.
end class.
\ No newline at end of file
Modified: net.sourceforge.progress.jms/src/net/sourceforge/progress/lang/UnsupportedOperationException.cls
===================================================================
--- net.sourceforge.progress.jms/src/net/sourceforge/progress/lang/UnsupportedOperationException.cls 2010-12-03 10:38:39 UTC (rev 87)
+++ net.sourceforge.progress.jms/src/net/sourceforge/progress/lang/UnsupportedOperationException.cls 2011-07-05 08:11:35 UTC (rev 88)
@@ -23,15 +23,25 @@
----------------------------------------------------------------------*/
-using Progress.Lang.AppError.
+using net.sourceforge.progress.lang.Exception.
class net.sourceforge.progress.lang.UnsupportedOperationException
- inherits AppError :
+ inherits Exception :
- constructor public UnsupportedOperationException():
- end constructor.
-
- constructor public UnsupportedOperationException ( reason as character ):
- ReturnValue = reason.
- end constructor.
+ constructor public UnsupportedOperationException ( ):
+ super ().
+ end constructor.
+
+ constructor public UnsupportedOperationException ( input errMsg as character ):
+ super (input errMsg).
+ end constructor.
+
+ constructor public UnsupportedOperationException ( input errMsg as character, input cause as Progress.Lang.Error ):
+ super (input errMsg, input cause).
+ end constructor.
+
+ constructor public UnsupportedOperationException ( input cause as Progress.Lang.Error ):
+ super (input cause).
+ end constructor.
+
end class.
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <me...@us...> - 2010-12-03 10:38:45
|
Revision: 87
http://progress-jms.svn.sourceforge.net/progress-jms/?rev=87&view=rev
Author: medu
Date: 2010-12-03 10:38:39 +0000 (Fri, 03 Dec 2010)
Log Message:
-----------
Fixed data type mismatch on override getInstance method.
Modified Paths:
--------------
net.sourceforge.progress.jms/src/net/sourceforge/progress/util/Collections/EmptyListIterator.cls
Modified: net.sourceforge.progress.jms/src/net/sourceforge/progress/util/Collections/EmptyListIterator.cls
===================================================================
--- net.sourceforge.progress.jms/src/net/sourceforge/progress/util/Collections/EmptyListIterator.cls 2010-12-03 10:34:29 UTC (rev 86)
+++ net.sourceforge.progress.jms/src/net/sourceforge/progress/util/Collections/EmptyListIterator.cls 2010-12-03 10:38:39 UTC (rev 87)
@@ -25,13 +25,11 @@
using Progress.Lang.*.
using java.util.ListIterator.
-using net.sourceforge.progress.util.Collections.EmptyIterator.
using net.sourceforge.progress.util.Collections.EmptyListIterator.
using net.sourceforge.progress.lang.NoSuchElementException.
using net.sourceforge.progress.lang.UnsupportedOperationException.
class net.sourceforge.progress.util.Collections.EmptyListIterator
- inherits EmptyIterator
implements ListIterator final :
define private static property instance as ListIterator no-undo
@@ -47,6 +45,19 @@
return instance.
end method.
+ method public logical hasNext( ):
+ return false.
+ end method.
+
+
+ method public Object next( ):
+ undo, throw new NoSuchElementException().
+ end method.
+
+ method public void remove( ):
+ undo, throw new UnsupportedOperationException().
+ end method.
+
method public void add( input listItem as Object ):
undo, throw new UnsupportedOperationException().
end method.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <me...@us...> - 2010-12-03 10:34:35
|
Revision: 86
http://progress-jms.svn.sourceforge.net/progress-jms/?rev=86&view=rev
Author: medu
Date: 2010-12-03 10:34:29 +0000 (Fri, 03 Dec 2010)
Log Message:
-----------
Fixed put-bytes/get-bytes default RAW data-type cast, use a memptr variable to tell get-bytes it does not have to return RAW.
Modified Paths:
--------------
net.sourceforge.progress.jms/src/net/sourceforge/progress/io/ByteArrayOutputStream.cls
Modified: net.sourceforge.progress.jms/src/net/sourceforge/progress/io/ByteArrayOutputStream.cls
===================================================================
--- net.sourceforge.progress.jms/src/net/sourceforge/progress/io/ByteArrayOutputStream.cls 2010-12-03 10:32:14 UTC (rev 85)
+++ net.sourceforge.progress.jms/src/net/sourceforge/progress/io/ByteArrayOutputStream.cls 2010-12-03 10:34:29 UTC (rev 86)
@@ -39,7 +39,7 @@
get.
set.
- define private variable bufSize as int64 no-undo.
+ define private variable bufSize as int64 no-undo.
constructor public ByteArrayOutputStream ( ):
this-object(32).
@@ -74,18 +74,23 @@
end method.
method public memptr toByteArray( ):
- define variable result as memptr no-undo.
+ define variable result as memptr no-undo.
- set-size(result) = count.
- put-bytes(result, 1) = get-bytes(buf, 1, count).
+ result = get-bytes(buf, 1, count).
return result.
end method.
method override public void write (bit as integer):
- expand(1).
+ if count + 1 gt bufSize then
+ expand(1).
count = count + 1.
put-byte(buf, count) = bit.
+
+ catch e as Progress.Lang.Error:
+ delete object e.
+ undo, throw new IOException().
+ end catch.
end method.
method override public void write (bytes as memptr, offset as integer, len as integer):
@@ -101,10 +106,16 @@
if len eq 0 then
return.
- expand(len).
+ if count + len gt bufSize then
+ expand(len).
put-bytes(buf, count + 1) = get-bytes(bytes, offset + 1, len).
count = count + len.
+
+ catch e as Progress.Lang.Error:
+ delete object e.
+ undo, throw new IOException().
+ end catch.
end method.
method public void writeTo (str as OutputStream):
@@ -116,17 +127,17 @@
end method.
method private void expand(len as integer):
- define variable tmp as memptr no-undo.
+ define variable tmp as memptr no-undo.
- if count + len le bufSize then
- return.
-
bufSize = (count + len) * 2.
- set-size(tmp) = bufSize.
- put-bytes(tmp, 1) = get-bytes(buf, 1, count).
+ copy-lob from buf to tmp no-convert.
set-size(buf) = 0.
- set-pointer-value(buf) = get-pointer-value(tmp).
+ set-size(buf) = bufSize.
+ put-bytes(buf, 1) = tmp.
+ finally:
+ set-size(tmp) = 0.
+ end finally.
end method.
end class.
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <me...@us...> - 2010-12-03 10:32:20
|
Revision: 85
http://progress-jms.svn.sourceforge.net/progress-jms/?rev=85&view=rev
Author: medu
Date: 2010-12-03 10:32:14 +0000 (Fri, 03 Dec 2010)
Log Message:
-----------
Try to avoid passing through multiple method calls.
Modified Paths:
--------------
net.sourceforge.progress.jms/src/net/sourceforge/progress/io/DataOutputStream.cls
Modified: net.sourceforge.progress.jms/src/net/sourceforge/progress/io/DataOutputStream.cls
===================================================================
--- net.sourceforge.progress.jms/src/net/sourceforge/progress/io/DataOutputStream.cls 2010-12-03 08:49:36 UTC (rev 84)
+++ net.sourceforge.progress.jms/src/net/sourceforge/progress/io/DataOutputStream.cls 2010-12-03 10:32:14 UTC (rev 85)
@@ -74,14 +74,14 @@
define variable tmp as memptr no-undo.
assign
- len = val:len()
+ len = val:len()
set-size(tmp) = len * 2.
do idx = 0 to len - 1:
put-short(tmp, idx * 2 + 1) = asc(val:charAt(idx)).
end.
- this-object:write(tmp, 0, len).
+ outStream:write(tmp, 0, len).
finally:
set-size(tmp) = 0.
@@ -94,10 +94,19 @@
end method.
method public void writeChars( input val as character ):
- define variable str as longchar no-undo.
+ define variable tmp as memptr no-undo.
+ define variable len as integer no-undo.
- str = val.
- writeChars(str).
+ assign
+ len = length(val, 'raw':u)
+ set-size(tmp) = len + 1
+ put-string(tmp, 1) = val.
+
+ outStream:write(tmp, 0, len).
+
+ finally:
+ set-size(tmp) = 0.
+ end finally.
end method.
method public void writeChars( input val as longchar ):
@@ -121,35 +130,35 @@
method public void writeDouble( input val as decimal ):
put-double(buf, 1) = val.
- this-object:write(buf, 0, 8).
+ outStream:write(buf, 0, 8).
end method.
method public void writeFloat( input val as decimal ):
put-float(buf, 1) = val.
- this-object:write(buf, 0, 4).
+ outStream:write(buf, 0, 4).
end method.
method public void writeInt( input val as integer ):
put-long(buf, 1) = val.
- this-object:write(buf, 0, 4).
+ outStream:write(buf, 0, 4).
end method.
method public void writeLong( input val as int64 ):
put-int64(buf, 1) = val.
- this-object:write(buf, 0, 8).
+ outStream:write(buf, 0, 8).
end method.
method public void writeShort( input val as integer ):
put-short(buf, 1) = val.
- this-object:write(buf, 0, 2).
+ outStream:write(buf, 0, 2).
end method.
method public void writeUTF( input val as character ):
- define variable str as longchar no-undo.
+ define variable str as longchar no-undo.
fix-codepage(str) = 'utf-8':u.
str = val.
@@ -157,17 +166,17 @@
end method.
method public void writeUTF( input val as longchar ):
- define variable tmp as memptr no-undo.
+ define variable tmp as memptr no-undo.
if get-codepage(val) ne 'utf-8':u then
copy-lob from val to tmp convert target codepage 'utf-8':u.
else
copy-lob from val to tmp no-convert.
- this-object:write(tmp, 0, integer(get-size(tmp))).
+ outStream:write(tmp, 0, integer(get-size(tmp))).
finally:
- set-size(tmp) = 0.
+ set-size(tmp) = 0.
end finally.
end method.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <me...@us...> - 2010-12-03 09:22:56
|
Revision: 84
http://progress-jms.svn.sourceforge.net/progress-jms/?rev=84&view=rev
Author: medu
Date: 2010-12-03 08:49:36 +0000 (Fri, 03 Dec 2010)
Log Message:
-----------
Use write-fragment method of sax writer.
Modified Paths:
--------------
net.sourceforge.progress.jms/src/net/sourceforge/progress/lang/StringBuffer.cls
Modified: net.sourceforge.progress.jms/src/net/sourceforge/progress/lang/StringBuffer.cls
===================================================================
--- net.sourceforge.progress.jms/src/net/sourceforge/progress/lang/StringBuffer.cls 2010-11-16 17:48:59 UTC (rev 83)
+++ net.sourceforge.progress.jms/src/net/sourceforge/progress/lang/StringBuffer.cls 2010-12-03 08:49:36 UTC (rev 84)
@@ -35,20 +35,35 @@
class net.sourceforge.progress.lang.StringBuffer implements StringBuffer :
define private variable charString as longchar no-undo.
+ define private variable saxWriter as handle no-undo.
constructor public StringBuffer ( ):
+ create sax-writer saxWriter.
+ assign
+ saxWriter:strict = false
+ saxWriter:fragment = true.
+
+ saxWriter:set-output-destination('longchar':u, charString).
+ saxWriter:start-document().
end constructor.
+ destructor public StringBuffer ( ):
+ delete object saxWriter no-error.
+ end destructor.
+
method public java.lang.StringBuffer append( input s as character ):
- charString = charString + s.
+ saxWriter:write-fragment(s).
+ return this-object.
end method.
method public java.lang.StringBuffer append( input s as longchar ):
- charString = charString + s.
+ saxWriter:write-fragment(s).
+ return this-object.
end method.
method public java.lang.StringBuffer append( input s as java.lang.String ):
this-object:append(s:toString()).
+ return this-object.
end method.
method public character charAt( input idx as integer ):
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <me...@us...> - 2010-11-16 17:49:05
|
Revision: 83
http://progress-jms.svn.sourceforge.net/progress-jms/?rev=83&view=rev
Author: medu
Date: 2010-11-16 17:48:59 +0000 (Tue, 16 Nov 2010)
Log Message:
-----------
Update JMS interfaces with missing methods.
Modified Paths:
--------------
net.sourceforge.progress.jms/src/javax/jms/TopicSession.cls
Modified: net.sourceforge.progress.jms/src/javax/jms/TopicSession.cls
===================================================================
--- net.sourceforge.progress.jms/src/javax/jms/TopicSession.cls 2010-11-16 17:01:29 UTC (rev 82)
+++ net.sourceforge.progress.jms/src/javax/jms/TopicSession.cls 2010-11-16 17:48:59 UTC (rev 83)
@@ -61,7 +61,18 @@
noLocal as logical).
/*------------------------------------------------------------------------------
+ Purpose: Creates a TemporaryTopic object.
+ ------------------------------------------------------------------------------*/
+ method public TemporaryTopic createTemporaryTopic(topicName as character).
+
+ /*------------------------------------------------------------------------------
Purpose: Creates a topic identity given a Topic name.
------------------------------------------------------------------------------*/
method public Topic createTopic(topicName as character).
+
+ /*------------------------------------------------------------------------------
+ Purpose: Unsubscribes a durable subscription that has been created by a client.
+ ------------------------------------------------------------------------------*/
+ method public void unsubscribe(name as character).
+
end interface.
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <me...@us...> - 2010-11-16 17:01:35
|
Revision: 82
http://progress-jms.svn.sourceforge.net/progress-jms/?rev=82&view=rev
Author: medu
Date: 2010-11-16 17:01:29 +0000 (Tue, 16 Nov 2010)
Log Message:
-----------
Generic wire format serialize.
Added Paths:
-----------
net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/WireFormat.cls
Added: net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/WireFormat.cls
===================================================================
--- net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/WireFormat.cls (rev 0)
+++ net.sourceforge.progress.jms/src/net/sourceforge/progress/jms/WireFormat.cls 2010-11-16 17:01:29 UTC (rev 82)
@@ -0,0 +1,44 @@
+/*------------------------------------------------------------------------
+ File : WireFormat
+ Purpose :
+ Syntax :
+ Description : Marshal messages in protocol specific packets.
+ Author(s) : Marian Edu
+ Created : Mon Nov 15 14:21:07 EET 2010
+ Notes :
+
+ Email : mar...@gm...
+ Website : www.ganimede.ro
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the Lesser GNU 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 program 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
+ Lesser GNU General Public License for more details.
+ You should have received a copy of the Lesser GNU General Public License
+ along with this program. If not, see < http://www.gnu.org/licenses/>.
+
+ ----------------------------------------------------------------------*/
+
+using Progress.Lang.*.
+using java.io.DataOutput.
+using java.io.DataInput.
+
+interface net.sourceforge.progress.jms.WireFormat:
+
+ method public integer getVersion ().
+
+ method public memptr marshal (msg as Object).
+
+ method public void marshal (msg as Object, dataOut as DataOutput).
+
+ method public Object unmarshal (byteMsg as memptr).
+
+ method public Object unmarshal (dataIn as DataInput).
+
+ method public void setVersion (version as integer).
+
+end interface.
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <me...@us...> - 2010-11-16 16:56:28
|
Revision: 81
http://progress-jms.svn.sourceforge.net/progress-jms/?rev=81&view=rev
Author: medu
Date: 2010-11-16 16:56:22 +0000 (Tue, 16 Nov 2010)
Log Message:
-----------
Update JMS interfaces with missing methods.
Modified Paths:
--------------
net.sourceforge.progress.jms/src/javax/jms/Connection.cls
net.sourceforge.progress.jms/src/javax/jms/MapMessage.cls
net.sourceforge.progress.jms/src/javax/jms/MessageProducer.cls
net.sourceforge.progress.jms/src/javax/jms/Session.cls
Added Paths:
-----------
net.sourceforge.progress.jms/src/javax/jms/ServerSession.cls
net.sourceforge.progress.jms/src/javax/jms/ServerSessionPool.cls
net.sourceforge.progress.jms/src/javax/jms/TemporaryTopic.cls
Modified: net.sourceforge.progress.jms/src/javax/jms/Connection.cls
===================================================================
--- net.sourceforge.progress.jms/src/javax/jms/Connection.cls 2010-11-16 16:42:16 UTC (rev 80)
+++ net.sourceforge.progress.jms/src/javax/jms/Connection.cls 2010-11-16 16:56:22 UTC (rev 81)
@@ -33,6 +33,11 @@
method public void close().
/*------------------------------------------------------------------------------
+ Purpose: Creates a Session object.
+ ------------------------------------------------------------------------------*/
+ method public Session createSession (transacted as logical, acknowledgeMode as integer).
+
+ /*------------------------------------------------------------------------------
Purpose: Gets the client identifier for this connection.
------------------------------------------------------------------------------*/
method public character getClientID().
Modified: net.sourceforge.progress.jms/src/javax/jms/MapMessage.cls
===================================================================
--- net.sourceforge.progress.jms/src/javax/jms/MapMessage.cls 2010-11-16 16:42:16 UTC (rev 80)
+++ net.sourceforge.progress.jms/src/javax/jms/MapMessage.cls 2010-11-16 16:56:22 UTC (rev 81)
@@ -93,7 +93,7 @@
/*------------------------------------------------------------------------------
Purpose: Indicates whether an item exists in this MapMessage object.
------------------------------------------------------------------------------*/
- method public logical itemExists().
+ method public logical itemExists (name as character).
/*------------------------------------------------------------------------------
Modified: net.sourceforge.progress.jms/src/javax/jms/MessageProducer.cls
===================================================================
--- net.sourceforge.progress.jms/src/javax/jms/MessageProducer.cls 2010-11-16 16:42:16 UTC (rev 80)
+++ net.sourceforge.progress.jms/src/javax/jms/MessageProducer.cls 2010-11-16 16:56:22 UTC (rev 81)
@@ -31,62 +31,88 @@
interface javax.jms.MessageProducer:
/*------------------------------------------------------------------------------
- Purpose: Closes the message producer.
- ------------------------------------------------------------------------------*/
+ Purpose: Closes the message producer.
+ ------------------------------------------------------------------------------*/
method public void close().
/*------------------------------------------------------------------------------
- Purpose: Gets the producer's default delivery mode.
- ------------------------------------------------------------------------------*/
+ Purpose: Gets the producer's default delivery mode.
+ ------------------------------------------------------------------------------*/
method public integer getDeliveryMode().
/*------------------------------------------------------------------------------
- Purpose: Gets an indication of whether message IDs are disabled.
- ------------------------------------------------------------------------------*/
+ Purpose: Gets an indication of whether message IDs are disabled.
+ ------------------------------------------------------------------------------*/
method public logical getDisableMessageID().
/*------------------------------------------------------------------------------
- Purpose: Gets an indication of whether message timestamps are disabled.
- ------------------------------------------------------------------------------*/
+ Purpose: Gets an indication of whether message timestamps are disabled.
+ ------------------------------------------------------------------------------*/
method public logical getDisableMessageTimestamp().
/*------------------------------------------------------------------------------
- Purpose: Gets the producer's default priority.
- ------------------------------------------------------------------------------*/
+ Purpose: Gets the producer's default priority.
+ ------------------------------------------------------------------------------*/
method public integer getPriority().
/*------------------------------------------------------------------------------
- Purpose: Gets the default length of time in milliseconds from its
- dispatch time that a produced message should be retained by
- the message system.
- ------------------------------------------------------------------------------*/
+ Purpose: Gets the default length of time in milliseconds from its
+ dispatch time that a produced message should be retained by
+ the message system.
+ ------------------------------------------------------------------------------*/
method public int64 getTimeToLive().
/*------------------------------------------------------------------------------
- Purpose: Sets the producer's default delivery mode.
- ------------------------------------------------------------------------------*/
+ Purpose: Sends a message using the MessageProducer's default delivery
+ mode, priority, and time to live.
+ ------------------------------------------------------------------------------*/
+ method public void send (msg as Message).
+
+ /*------------------------------------------------------------------------------
+ Purpose: Sends a message to a destination for an unidentified message
+ producer.
+ ------------------------------------------------------------------------------*/
+ method public void send (destination as Destination, msg as Message).
+
+ /*------------------------------------------------------------------------------
+ Purpose: Sends a message to the destination, specifying delivery mode,
+ priority, and time to live.
+ ------------------------------------------------------------------------------*/
+ method public void send (msg as Message,
+ deliveryMode as integer, priority as integer, timeToLive as int64).
+
+ /*------------------------------------------------------------------------------
+ Purpose: Sends a message to a destination for an unidentified message
+ producer, specifying delivery mode, priority and time to live.
+ ------------------------------------------------------------------------------*/
+ method public void send (destination as Destination, msg as Message,
+ deliveryMode as integer, priority as integer, timeToLive as int64).
+
+ /*------------------------------------------------------------------------------
+ Purpose: Sets the producer's default delivery mode.
+ ------------------------------------------------------------------------------*/
method public void setDeliveryMode(deliveryMode as integer).
/*------------------------------------------------------------------------------
- Purpose: Sets an indication of whether message IDs are disabled.
- ------------------------------------------------------------------------------*/
+ Purpose: Sets an indication of whether message IDs are disabled.
+ ------------------------------------------------------------------------------*/
method public void setDisableMessageID(val as logical).
/*------------------------------------------------------------------------------
- Purpose: Sets an indication of whether message timestamps are disabled.
- ------------------------------------------------------------------------------*/
+ Purpose: Sets an indication of whether message timestamps are disabled.
+ ------------------------------------------------------------------------------*/
method public void setDisableMessageTimestamp(val as logical).
/*------------------------------------------------------------------------------
- Purpose: Sets the producer's default priority.
- ------------------------------------------------------------------------------*/
+ Purpose: Sets the producer's default priority.
+ ------------------------------------------------------------------------------*/
method public void setPriority(priority as integer).
/*------------------------------------------------------------------------------
- Purpose: Sets the default length of time in milliseconds from its
- dispatch time that a produced message should be retained by
- the message system.
- ------------------------------------------------------------------------------*/
+ Purpose: Sets the default length of time in milliseconds from its
+ dispatch time that a produced message should be retained by
+ the message system.
+ ------------------------------------------------------------------------------*/
method public void setTimeToLive(timeToLive as int64).
end interface.
\ No newline at end of file
Added: net.sourceforge.progress.jms/src/javax/jms/ServerSession.cls
===================================================================
--- net.sourceforge.progress.jms/src/javax/jms/ServerSession.cls (rev 0)
+++ net.sourceforge.progress.jms/src/javax/jms/ServerSession.cls 2010-11-16 16:56:22 UTC (rev 81)
@@ -0,0 +1,37 @@
+/*------------------------------------------------------------------------
+ File : ServerSession
+ Purpose :
+ Syntax :
+ Description : A ServerSession object is an application server object
+ that is used by a server to associate a thread with a
+ JMS session (optional).
+
+ Author(s) : Marian Edu
+ Created : Sun Oct 03 13:06:16 EEST 2010
+ Notes :
+
+ Email : mar...@gm...
+ Website : www.ganimede.ro
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the Lesser GNU 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 program 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
+ Lesser GNU General Public License for more details.
+ You should have received a copy of the Lesser GNU General Public License
+ along with this program. If not, see < http://www.gnu.org/licenses/>.
+
+ ----------------------------------------------------------------------*/
+
+using javax.jms.Session.
+
+interface javax.jms.ServerSession:
+
+ method public Session getSession().
+
+ method public void start().
+
+end interface.
\ No newline at end of file
Added: net.sourceforge.progress.jms/src/javax/jms/ServerSessionPool.cls
===================================================================
--- net.sourceforge.progress.jms/src/javax/jms/ServerSessionPool.cls (rev 0)
+++ net.sourceforge.progress.jms/src/javax/jms/ServerSessionPool.cls 2010-11-16 16:56:22 UTC (rev 81)
@@ -0,0 +1,36 @@
+/*------------------------------------------------------------------------
+ File : ServerSessionPool
+ Purpose :
+ Syntax :
+ Description : A ServerSessionPool object is an object implemented by an
+ application server to provide a pool of ServerSession
+ objects for processing the messages of a
+ ConnectionConsumer (optional).
+
+ Author(s) : Marian Edu
+ Created : Sun Oct 03 13:06:16 EEST 2010
+ Notes :
+
+ Email : mar...@gm...
+ Website : www.ganimede.ro
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the Lesser GNU 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 program 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
+ Lesser GNU General Public License for more details.
+ You should have received a copy of the Lesser GNU General Public License
+ along with this program. If not, see < http://www.gnu.org/licenses/>.
+
+ ----------------------------------------------------------------------*/
+
+using javax.jms.ServerSession.
+
+interface javax.jms.ServerSessionPool:
+
+ method public ServerSession getServerSession().
+
+end interface.
\ No newline at end of file
Modified: net.sourceforge.progress.jms/src/javax/jms/Session.cls
===================================================================
--- net.sourceforge.progress.jms/src/javax/jms/Session.cls 2010-11-16 16:42:16 UTC (rev 80)
+++ net.sourceforge.progress.jms/src/javax/jms/Session.cls 2010-11-16 16:56:22 UTC (rev 81)
@@ -34,6 +34,7 @@
----------------------------------------------------------------------*/
using javax.jms.*.
+using Progress.Lang.Object.
interface javax.jms.Session:
@@ -46,6 +47,9 @@
define public property DUPS_OK_ACKNOWLEDGE as integer no-undo
get.
+ define public property SESSION_TRANSACTED as integer no-undo
+ get.
+
/*------------------------------------------------------------------------------
Purpose: Closes the session.
------------------------------------------------------------------------------*/
@@ -58,11 +62,47 @@
method public void commit().
/*------------------------------------------------------------------------------
+ Purpose: Creates a QueueBrowser object to peek at the messages on
+ the specified queue.
+ ------------------------------------------------------------------------------*/
+ method public QueueBrowser createBrowser (queue as Queue).
+
+ /*------------------------------------------------------------------------------
+ Purpose: Creates a QueueBrowser object to peek at the messages on
+ the specified queue, using a message selector.
+ ------------------------------------------------------------------------------*/
+ method public QueueBrowser createBrowser (queue as Queue, messageSelector as character).
+
+ /*------------------------------------------------------------------------------
Purpose: Creates a BytesMessage object.
------------------------------------------------------------------------------*/
method public BytesMessage createBytesMessage ().
/*------------------------------------------------------------------------------
+ Purpose: Creates a MessageConsumer for the specified destination.
+ ------------------------------------------------------------------------------*/
+ method public MessageConsumer createConsumer (dest as Destination).
+
+ /*------------------------------------------------------------------------------
+ Purpose: Creates a MessageConsumer for the specified destination, using
+ a message selector.
+ ------------------------------------------------------------------------------*/
+ method public MessageConsumer createConsumer (dest as Destination, messageSelector as character).
+
+ /*------------------------------------------------------------------------------
+ Purpose: Creates a durable subscriber to the specified topic.
+ ------------------------------------------------------------------------------*/
+ method public TopicSubscriber createDurableSubscriber (topic as Topic, name as character ).
+
+ /*------------------------------------------------------------------------------
+ Purpose: Creates a durable subscriber to the specified topic, using a
+ message selector and specifying whether messages published by
+ its own connection should be delivered to it.
+ ------------------------------------------------------------------------------*/
+ method public TopicSubscriber createDurableSubscriber (topic as Topic, name as character,
+ messageSelector as character, noLocal as logical ).
+
+ /*------------------------------------------------------------------------------
Purpose: Creates a MapMessage object.
------------------------------------------------------------------------------*/
method public MapMessage createMapMessage ().
@@ -80,9 +120,37 @@
/*------------------------------------------------------------------------------
Purpose: Creates a ObjectMessage object.
------------------------------------------------------------------------------*/
- method public ObjectMessage createObjectMessage (object as java.io.Serializable).
+ method public ObjectMessage createObjectMessage (obj as java.io.Serializable).
/*------------------------------------------------------------------------------
+ Purpose: Creates a MessageProducer to send messages to the specified
+ destination.
+ ------------------------------------------------------------------------------*/
+ method public MessageProducer createProducer (dest as Destination).
+
+ /*------------------------------------------------------------------------------
+ Purpose: Creates a queue identity given a Queue name.
+ ------------------------------------------------------------------------------*/
+ method public Queue createQueue (queueName as character).
+
+ /*------------------------------------------------------------------------------
+ Purpose: Creates a StreamMessage object.
+ ------------------------------------------------------------------------------*/
+ method public StreamMessage createStreamMessage ().
+
+ /*------------------------------------------------------------------------------
+ Purpose: Creates a TemporaryQueue object. Its lifetime will be that
+ of the Connection unless it is deleted earlier.
+ ------------------------------------------------------------------------------*/
+ method public TemporaryQueue createTemporaryQueue ().
+
+ /*------------------------------------------------------------------------------
+ Purpose: Creates a TemporaryTopic object. Its lifetime will be that
+ of the Connection unless it is deleted earlier.
+ ------------------------------------------------------------------------------*/
+ method public TemporaryTopic createTemporaryTopic ().
+
+ /*------------------------------------------------------------------------------
Purpose: Creates a TextMessage object.
------------------------------------------------------------------------------*/
method public TextMessage createTextMessage ().
@@ -93,6 +161,19 @@
method public TextMessage createTextMessage (string as character).
/*------------------------------------------------------------------------------
+ Purpose: Creates a topic identity given a Topic name.
+ ------------------------------------------------------------------------------*/
+ method public Topic createTopic (topicName as character).
+
+ /*------------------------------------------------------------------------------
+ Purpose: Returns the acknowledgement mode of the session. The
+ acknowledgement mode is set at the time that the session is
+ created. If the session is transacted, the acknowledgement
+ mode is ignored.
+ ------------------------------------------------------------------------------*/
+ method public integer getAcknowledgeMode ().
+
+ /*------------------------------------------------------------------------------
Purpose: Returns the session's distinguished message listener.
------------------------------------------------------------------------------*/
method public MessageListener getMessageListener().
@@ -124,4 +205,10 @@
Purpose: Sets the session's distinguished message listener.
------------------------------------------------------------------------------*/
method public void setMessageListener(listener as MessageListener).
+
+ /*------------------------------------------------------------------------------
+ Purpose: Sets the session's distinguished message listener.
+ ------------------------------------------------------------------------------*/
+ method public void unsubscribe(name as character).
+
end interface.
\ No newline at end of file
Added: net.sourceforge.progress.jms/src/javax/jms/TemporaryTopic.cls
===================================================================
--- net.sourceforge.progress.jms/src/javax/jms/TemporaryTopic.cls (rev 0)
+++ net.sourceforge.progress.jms/src/javax/jms/TemporaryTopic.cls 2010-11-16 16:56:22 UTC (rev 81)
@@ -0,0 +1,36 @@
+/*------------------------------------------------------------------------
+ File : TemporaryTopic
+ Purpose :
+ Syntax :
+ Description : A TemporaryTopic object is a unique Topic object created
+ for the duration of a TopicConnection. It is a
+ system-defined Topic that can be consumed only by the
+ TopicConnection that created it.
+ Author(s) : Marian Edu
+ Created : Sun Jan 03 20:11:04 EET 2010
+ Notes :
+
+ Email : mar...@gm...
+ Website : www.ganimede.ro
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the Lesser GNU 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 program 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
+ Lesser GNU General Public License for more details.
+ You should have received a copy of the Lesser GNU General Public License
+ along with this program. If not, see < http://www.gnu.org/licenses/>.
+
+ ----------------------------------------------------------------------*/
+
+interface javax.jms.TemporaryTopic:
+
+ /*------------------------------------------------------------------------------
+ Purpose: Deletes this temporary Topic.
+ ------------------------------------------------------------------------------*/
+ method public void delete().
+
+end interface.
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <me...@us...> - 2010-11-16 16:42:22
|
Revision: 80
http://progress-jms.svn.sourceforge.net/progress-jms/?rev=80&view=rev
Author: medu
Date: 2010-11-16 16:42:16 +0000 (Tue, 16 Nov 2010)
Log Message:
-----------
Update IO objects with ABL specific methods.
Modified Paths:
--------------
net.sourceforge.progress.jms/src/java/io/DataInput.cls
net.sourceforge.progress.jms/src/java/io/Serializable.cls
net.sourceforge.progress.jms/src/net/sourceforge/progress/io/DataInput.cls
net.sourceforge.progress.jms/src/net/sourceforge/progress/io/DataInputStream.cls
Modified: net.sourceforge.progress.jms/src/java/io/DataInput.cls
===================================================================
--- net.sourceforge.progress.jms/src/java/io/DataInput.cls 2010-11-16 16:30:04 UTC (rev 79)
+++ net.sourceforge.progress.jms/src/java/io/DataInput.cls 2010-11-16 16:42:16 UTC (rev 80)
@@ -46,6 +46,8 @@
method public String readLine().
+ method public character readLineAsCharacter().
+
method public int64 readLong().
method public integer readShort().
Modified: net.sourceforge.progress.jms/src/java/io/Serializable.cls
===================================================================
--- net.sourceforge.progress.jms/src/java/io/Serializable.cls 2010-11-16 16:30:04 UTC (rev 79)
+++ net.sourceforge.progress.jms/src/java/io/Serializable.cls 2010-11-16 16:42:16 UTC (rev 80)
@@ -25,5 +25,9 @@
----------------------------------------------------------------------*/
interface java.io.Serializable:
+
+ method public void readObjectState (serializedObj as memptr).
+
+ method public memptr writeObjectState ().
end interface.
\ No newline at end of file
Modified: net.sourceforge.progress.jms/src/net/sourceforge/progress/io/DataInput.cls
===================================================================
--- net.sourceforge.progress.jms/src/net/sourceforge/progress/io/DataInput.cls 2010-11-16 16:30:04 UTC (rev 79)
+++ net.sourceforge.progress.jms/src/net/sourceforge/progress/io/DataInput.cls 2010-11-16 16:42:16 UTC (rev 80)
@@ -46,7 +46,7 @@
method public String readLine().
- method public character readLineChars().
+ method public character readLineAsCharacter().
method public int64 readLong().
@@ -58,7 +58,7 @@
method public String readUTF().
- method public longchar readUTFChars().
+ method public character readUTFCharacter().
method public integer skipBytes(offset as integer).
Modified: net.sourceforge.progress.jms/src/net/sourceforge/progress/io/DataInputStream.cls
===================================================================
--- net.sourceforge.progress.jms/src/net/sourceforge/progress/io/DataInputStream.cls 2010-11-16 16:30:04 UTC (rev 79)
+++ net.sourceforge.progress.jms/src/net/sourceforge/progress/io/DataInputStream.cls 2010-11-16 16:42:16 UTC (rev 80)
@@ -142,11 +142,11 @@
end method.
method public java.lang.String readLine( ):
- return new String(readLineChars()).
+ return new String(readLineAsCharacter()).
end method.
- method public character readLineChars( ):
+ method public character readLineAsCharacter( ):
define variable ln as character no-undo.
define variable nl as logical no-undo.
define variable bit as integer no-undo.
@@ -228,7 +228,7 @@
end method.
- method public longchar readUTFChars( ):
+ method public character readUTFCharacter( ):
undo, throw new Progress.Lang.AppError("METHOD NOT IMPLEMENTED").
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <me...@us...> - 2010-11-16 16:30:11
|
Revision: 79
http://progress-jms.svn.sourceforge.net/progress-jms/?rev=79&view=rev
Author: medu
Date: 2010-11-16 16:30:04 +0000 (Tue, 16 Nov 2010)
Log Message:
-----------
Added new methods in String object and a new StringBuffer object.
Modified Paths:
--------------
net.sourceforge.progress.jms/src/java/lang/String.cls
net.sourceforge.progress.jms/src/net/sourceforge/progress/lang/String.cls
Added Paths:
-----------
net.sourceforge.progress.jms/src/java/lang/Runnable.cls
net.sourceforge.progress.jms/src/java/lang/StringBuffer.cls
net.sourceforge.progress.jms/src/net/sourceforge/progress/lang/StringBuffer.cls
Added: net.sourceforge.progress.jms/src/java/lang/Runnable.cls
===================================================================
--- net.sourceforge.progress.jms/src/java/lang/Runnable.cls (rev 0)
+++ net.sourceforge.progress.jms/src/java/lang/Runnable.cls 2010-11-16 16:30:04 UTC (rev 79)
@@ -0,0 +1,33 @@
+/*------------------------------------------------------------------------
+ File : Runnable
+ Purpose :
+ Syntax :
+ Description : The Runnable interface should be implemented by any class
+ whose instances are intended to be executed by a thread.
+ The class must define a method of no arguments called run.
+ Author(s) : Marian Edu
+ Created : Mon Nov 08 10:46:02 EET 2010
+ Notes :
+
+ Email : mar...@gm...
+ Website : www.ganimede.ro
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the Lesser GNU 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 program 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
+ Lesser GNU General Public License for more details.
+ You should have received a copy of the Lesser GNU General Public License
+ along with this program. If not, see < http://www.gnu.org/licenses/>.
+
+ ----------------------------------------------------------------------*/
+
+
+interface java.lang.Runnable:
+
+ method public void run ().
+
+end interface.
\ No newline at end of file
Modified: net.sourceforge.progress.jms/src/java/lang/String.cls
===================================================================
--- net.sourceforge.progress.jms/src/java/lang/String.cls 2010-11-16 16:28:28 UTC (rev 78)
+++ net.sourceforge.progress.jms/src/java/lang/String.cls 2010-11-16 16:30:04 UTC (rev 79)
@@ -29,6 +29,8 @@
method override public logical equals (obj as Progress.Lang.Object).
+ method public memptr getBytes (cp as character).
+
method public integer len ().
method public void setValue(val as character).
Added: net.sourceforge.progress.jms/src/java/lang/StringBuffer.cls
===================================================================
--- net.sourceforge.progress.jms/src/java/lang/StringBuffer.cls (rev 0)
+++ net.sourceforge.progress.jms/src/java/lang/StringBuffer.cls 2010-11-16 16:30:04 UTC (rev 79)
@@ -0,0 +1,50 @@
+/*------------------------------------------------------------------------
+ File : StringBuffer
+ Purpose :
+ Syntax :
+ Description : A string buffer is like a String, but can be modified.
+ At any point in time it contains some particular sequence
+ of characters, but the length and content of the sequence
+ can be changed through certain method calls.
+
+ Author(s) : Marian Edu
+ Created : Wed Mar 17 21:23:33 EET 2010
+ Notes :
+
+ Email : mar...@gm...
+ Website : www.ganimede.ro
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the Lesser GNU 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 program 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
+ Lesser GNU General Public License for more details.
+ You should have received a copy of the Lesser GNU General Public License
+ along with this program. If not, see < http://www.gnu.org/licenses/>.
+
+ ----------------------------------------------------------------------*/
+using java.lang.StringBuffer.
+using java.lang.String.
+
+interface java.lang.StringBuffer:
+
+ method public StringBuffer append (s as character).
+
+ method public StringBuffer append (s as longchar).
+
+ method public StringBuffer append (s as String).
+
+ method public character charAt (idx as integer).
+
+ method public integer len ().
+
+ method override public character toString().
+
+ method public String getString().
+
+ method public longchar getLongChar().
+
+end interface.
\ No newline at end of file
Modified: net.sourceforge.progress.jms/src/net/sourceforge/progress/lang/String.cls
===================================================================
--- net.sourceforge.progress.jms/src/net/sourceforge/progress/lang/String.cls 2010-11-16 16:28:28 UTC (rev 78)
+++ net.sourceforge.progress.jms/src/net/sourceforge/progress/lang/String.cls 2010-11-16 16:30:04 UTC (rev 79)
@@ -94,6 +94,16 @@
return false.
end method.
+
+
+ method public memptr getBytes( input cp as character ):
+ define variable mp as memptr no-undo.
+
+ copy-lob charString to mp convert target codepage cp.
+ return mp.
+ end method.
+
+
method public integer len ():
return length(charString, 'character':u).
end method.
Added: net.sourceforge.progress.jms/src/net/sourceforge/progress/lang/StringBuffer.cls
===================================================================
--- net.sourceforge.progress.jms/src/net/sourceforge/progress/lang/StringBuffer.cls (rev 0)
+++ net.sourceforge.progress.jms/src/net/sourceforge/progress/lang/StringBuffer.cls 2010-11-16 16:30:04 UTC (rev 79)
@@ -0,0 +1,76 @@
+/*------------------------------------------------------------------------
+ File : StringBuffer
+ Purpose :
+ Syntax :
+ Description : A string buffer is like a String, but can be modified.
+ At any point in time it contains some particular sequence
+ of characters, but the length and content of the sequence
+ can be changed through certain method calls.
+
+ Author(s) : Marian Edu
+ Created : Mon Nov 15 20:52:33 EET 2010
+ Notes :
+
+ Email : mar...@gm...
+ Website : www.ganimede.ro
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the Lesser GNU 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 program 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
+ Lesser GNU General Public License for more details.
+ You should have received a copy of the Lesser GNU General Public License
+ along with this program. If not, see < http://www.gnu.org/licenses/>.
+
+ ----------------------------------------------------------------------*/
+
+using java.lang.StringBuffer.
+using java.lang.String.
+
+routine-level on error undo, throw.
+
+class net.sourceforge.progress.lang.StringBuffer implements StringBuffer :
+
+ define private variable charString as longchar no-undo.
+
+ constructor public StringBuffer ( ):
+ end constructor.
+
+ method public java.lang.StringBuffer append( input s as character ):
+ charString = charString + s.
+ end method.
+
+ method public java.lang.StringBuffer append( input s as longchar ):
+ charString = charString + s.
+ end method.
+
+ method public java.lang.StringBuffer append( input s as java.lang.String ):
+ this-object:append(s:toString()).
+ end method.
+
+ method public character charAt( input idx as integer ):
+ define variable idxChar as character no-undo.
+ idxChar = substring(charString, idx + 1, 1, 'character':u).
+ return idxChar.
+ end method.
+
+ method public longchar getLongChar( ):
+ return charString.
+ end method.
+
+ method public java.lang.String getString( ):
+ return new net.sourceforge.progress.lang.String(charString).
+ end method.
+
+ method public integer len( ):
+ return length(charString, 'character':u).
+ end method.
+
+ method override public character toString( ):
+ return string(charString).
+ end method.
+
+end class.
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <me...@us...> - 2010-11-16 16:28:35
|
Revision: 78
http://progress-jms.svn.sourceforge.net/progress-jms/?rev=78&view=rev
Author: medu
Date: 2010-11-16 16:28:28 +0000 (Tue, 16 Nov 2010)
Log Message:
-----------
Added 'empty' collection related elements.
Modified Paths:
--------------
net.sourceforge.progress.jms/src/net/sourceforge/progress/util/Collections/EmptyIterator.cls
net.sourceforge.progress.jms/src/net/sourceforge/progress/util/Collections/EmptyList.cls
net.sourceforge.progress.jms/src/net/sourceforge/progress/util/Collections/EmptyListIterator.cls
net.sourceforge.progress.jms/src/net/sourceforge/progress/util/Collections/EmptyMap.cls
net.sourceforge.progress.jms/src/net/sourceforge/progress/util/Collections/EmptySet.cls
net.sourceforge.progress.jms/src/net/sourceforge/progress/util/Collections.cls
Modified: net.sourceforge.progress.jms/src/net/sourceforge/progress/util/Collections/EmptyIterator.cls
===================================================================
--- net.sourceforge.progress.jms/src/net/sourceforge/progress/util/Collections/EmptyIterator.cls 2010-11-16 16:26:55 UTC (rev 77)
+++ net.sourceforge.progress.jms/src/net/sourceforge/progress/util/Collections/EmptyIterator.cls 2010-11-16 16:28:28 UTC (rev 78)
@@ -25,11 +25,25 @@
using Progress.Lang.*.
using java.util.Iterator.
+using net.sourceforge.progress.util.Collections.EmptyIterator.
using net.sourceforge.progress.lang.NoSuchElementException.
using net.sourceforge.progress.lang.UnsupportedOperationException.
class net.sourceforge.progress.util.Collections.EmptyIterator implements Iterator :
+ define private static property instance as Iterator no-undo
+ get.
+ set.
+
+ constructor private EmptyIterator ():
+ end constructor.
+
+ method public static Iterator getInstance ():
+ if not valid-object(instance) then
+ instance = new EmptyIterator().
+ return instance.
+ end method.
+
method public logical hasNext( ):
return false.
end method.
Modified: net.sourceforge.progress.jms/src/net/sourceforge/progress/util/Collections/EmptyList.cls
===================================================================
--- net.sourceforge.progress.jms/src/net/sourceforge/progress/util/Collections/EmptyList.cls 2010-11-16 16:26:55 UTC (rev 77)
+++ net.sourceforge.progress.jms/src/net/sourceforge/progress/util/Collections/EmptyList.cls 2010-11-16 16:28:28 UTC (rev 78)
@@ -23,15 +23,29 @@
----------------------------------------------------------------------*/
using Progress.Lang.Object.
-
+using java.util.List.
using java.util.RandomAccess.
using net.sourceforge.progress.util.AbstractList.
+using net.sourceforge.progress.util.Collections.EmptyList.
using net.sourceforge.progress.lang.IndexOutOfBoundsException.
class net.sourceforge.progress.util.Collections.EmptyList
inherits AbstractList
implements RandomAccess final :
+ define private static property instance as List no-undo
+ get.
+ set.
+
+ constructor private EmptyList ():
+ end constructor.
+
+ method public static List getInstance ():
+ if not valid-object(instance) then
+ instance = new EmptyList().
+ return instance.
+ end method.
+
method override public logical contains( input listItem as Object ):
return false.
end method.
Modified: net.sourceforge.progress.jms/src/net/sourceforge/progress/util/Collections/EmptyListIterator.cls
===================================================================
--- net.sourceforge.progress.jms/src/net/sourceforge/progress/util/Collections/EmptyListIterator.cls 2010-11-16 16:26:55 UTC (rev 77)
+++ net.sourceforge.progress.jms/src/net/sourceforge/progress/util/Collections/EmptyListIterator.cls 2010-11-16 16:28:28 UTC (rev 78)
@@ -26,6 +26,7 @@
using Progress.Lang.*.
using java.util.ListIterator.
using net.sourceforge.progress.util.Collections.EmptyIterator.
+using net.sourceforge.progress.util.Collections.EmptyListIterator.
using net.sourceforge.progress.lang.NoSuchElementException.
using net.sourceforge.progress.lang.UnsupportedOperationException.
@@ -33,6 +34,19 @@
inherits EmptyIterator
implements ListIterator final :
+ define private static property instance as ListIterator no-undo
+ get.
+ set.
+
+ constructor private EmptyListIterator ():
+ end constructor.
+
+ method public static ListIterator getInstance ():
+ if not valid-object(instance) then
+ instance = new EmptyListIterator().
+ return instance.
+ end method.
+
method public void add( input listItem as Object ):
undo, throw new UnsupportedOperationException().
end method.
Modified: net.sourceforge.progress.jms/src/net/sourceforge/progress/util/Collections/EmptyMap.cls
===================================================================
--- net.sourceforge.progress.jms/src/net/sourceforge/progress/util/Collections/EmptyMap.cls 2010-11-16 16:26:55 UTC (rev 77)
+++ net.sourceforge.progress.jms/src/net/sourceforge/progress/util/Collections/EmptyMap.cls 2010-11-16 16:28:28 UTC (rev 78)
@@ -24,13 +24,28 @@
----------------------------------------------------------------------*/
using Progress.Lang.Object.
using java.util.Set.
+using java.util.Map.
using java.util.Collection.
using net.sourceforge.progress.util.Collections.
using net.sourceforge.progress.util.AbstractMap.
+using net.sourceforge.progress.util.Collections.EmptyMap.
class net.sourceforge.progress.util.Collections.EmptyMap
inherits AbstractMap final :
+ define private static property instance as Map no-undo
+ get.
+ set.
+
+ constructor private EmptyMap ():
+ end constructor.
+
+ method public static Map getInstance ():
+ if not valid-object(instance) then
+ instance = new EmptyMap().
+ return instance.
+ end method.
+
method override public logical containsKey( input keyObj as Object ):
return false.
end method.
Modified: net.sourceforge.progress.jms/src/net/sourceforge/progress/util/Collections/EmptySet.cls
===================================================================
--- net.sourceforge.progress.jms/src/net/sourceforge/progress/util/Collections/EmptySet.cls 2010-11-16 16:26:55 UTC (rev 77)
+++ net.sourceforge.progress.jms/src/net/sourceforge/progress/util/Collections/EmptySet.cls 2010-11-16 16:28:28 UTC (rev 78)
@@ -26,17 +26,32 @@
using net.sourceforge.progress.util.AbstractSet.
using java.util.Iterator.
+using java.util.Set.
+using net.sourceforge.progress.util.Collections.EmptySet.
using net.sourceforge.progress.util.Collections.EmptyIterator.
class net.sourceforge.progress.util.Collections.EmptySet
inherits AbstractSet final :
+
+ define private static property instance as Set no-undo
+ get.
+ set.
+
+ constructor private EmptySet ():
+ end constructor.
+
+ method public static Set getInstance ():
+ if not valid-object(instance) then
+ instance = new EmptySet().
+ return instance.
+ end method.
method override public logical contains( input listItem as Object ):
return false.
end method.
method override public Iterator iterator ():
- return new EmptyIterator().
+ return EmptyIterator:getInstance().
end method.
method override public integer size():
Modified: net.sourceforge.progress.jms/src/net/sourceforge/progress/util/Collections.cls
===================================================================
--- net.sourceforge.progress.jms/src/net/sourceforge/progress/util/Collections.cls 2010-11-16 16:26:55 UTC (rev 77)
+++ net.sourceforge.progress.jms/src/net/sourceforge/progress/util/Collections.cls 2010-11-16 16:28:28 UTC (rev 78)
@@ -1,48 +1,55 @@
- /*------------------------------------------------------------------------
- File : Collections
- Purpose :
- Syntax :
- Description :
- Author(s) : Marian Edu
- Created : Fri Aug 27 21:44:07 EEST 2010
- Notes :
+/*------------------------------------------------------------------------
+ File : Collections
+ Purpose :
+ Syntax :
+ Description :
+ Author(s) : Marian Edu
+ Created : Fri Aug 27 21:44:07 EEST 2010
+ Notes :
- Email : mar...@gm...
- Website : www.ganimede.ro
+ Email : mar...@gm...
+ Website : www.ganimede.ro
- This program is free software: you can redistribute it and/or modify
- it under the terms of the Lesser GNU 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 program 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
- Lesser GNU General Public License for more details.
- You should have received a copy of the Lesser GNU General Public License
- along with this program. If not, see < http://www.gnu.org/licenses/>.
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the Lesser GNU 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 program 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
+ Lesser GNU General Public License for more details.
+ You should have received a copy of the Lesser GNU General Public License
+ along with this program. If not, see < http://www.gnu.org/licenses/>.
- ----------------------------------------------------------------------*/
-using java.util.List.
-using java.util.Set.
-using java.util.Map.
-
+ ----------------------------------------------------------------------*/
+using java.util.*.
using net.sourceforge.progress.util.Collections.*.
class net.sourceforge.progress.util.Collections final :
- define public static property EMPTY_LIST as List no-undo
+ define public static property EMPTY_LIST as List no-undo
get:
- return new EmptyList().
+ return EmptyList:getInstance().
end get.
- define public static property EMPTY_SET as Set no-undo
+ define public static property EMPTY_SET as Set no-undo
get:
- return new EmptySet().
+ return EmptySet:getInstance().
end get.
- define public static property EMPTY_MAP as Map no-undo
+ define public static property EMPTY_MAP as Map no-undo
get:
- return new EmptyMap().
+ return EmptyMap:getInstance().
end get.
-
+
+ define public static property EMPTY_ITERATOR as Iterator no-undo
+ get:
+ return EmptyIterator:getInstance().
+ end get.
+
+ define public static property EMPTY_LIST_ITERATOR as ListIterator no-undo
+ get:
+ return EmptyListIterator:getInstance().
+ end get.
+
end class.
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|